Trying to set a cookie based on $_POST parameter
I’ve been able to set cookies properly at both the template_redirect and init action hooks. You might try using one of those instead.
I’ve been able to set cookies properly at both the template_redirect and init action hooks. You might try using one of those instead.
First of all, search this site. This questions has been answered many times in the past: https://wordpress.stackexchange.com/search?q=clean+wp_head and https://wordpress.stackexchange.com/search?q=security+obscurity Secondly, there is a difference in what WP loads and what a theme and a plugin will load. Look in the theme functions file to see what the theme loads, i.e. javascripts and CSS. Look in … Read more
The following code will cycle between the 9 pics. 1st day of the year = pic0, 2nd = pic1…359th = pic9, 360th = pic0, etc. <?php $pic_array = array( ‘pic0’, ‘pic1’, ‘pic2’, ‘pic3’, ‘pic4’, ‘pic5’, ‘pic6’, ‘pic7’, ‘pic8’, ); $d = (int) date(‘z’) % 9; $todays_pic = $pic_array[$d]; echo $todays_pic; Hopefully you’re not changing a … Read more
Opps had same issue few weeks back. check your .htaccess file some code written to block css file that is why you are getting 403 error message. code can be look like <Files ~ “(.js|.css)”> Order allow,deny Deny from all </Files>
If you don’t want get_header, then don’t call get_header(). It’s a simple as that, the get_header function is not where all of the WP core is initialized. The simplest way to do this is using the template hierarchy to create a template for a specific page slug or id. From the WP Admin, create a … Read more
It is my understanding that there should not be more than one <h1> tag on a page, and that the <h1> tag should be the site title, for SEO reasons. But that’s your opinion, not a rule. From an accessibility perspective the h1 should be used for main content’s title, on a single page that … Read more
They are probably loaded in your functions.php file in your theme folder. Look for lines like: For CSS: wp_enqueue_style( … ); For JS: wp_enqueue_script( … );
try is_front_page() conditional function <?php } else { ?> <hgroup> <?php $is_front_page = is_front_page() ? ‘h1’ : ‘h6’; ?> <<?php echo $is_front_page ?> class=”site-title”><a href=”https://wordpress.stackexchange.com/questions/88142/<?php echo home_url(“https://wordpress.stackexchange.com/” ); ?>” title=”<?php echo esc_attr( get_bloginfo( ‘name’, ‘display’ ) ); ?>” rel=”home”><?php bloginfo( ‘name’ ); ?></a></h1> <h2 class=”site-description”><?php bloginfo( ‘description’ ); ?></h2> </hgroup> <?php } ?> Edit To … Read more
If done right there should be a callback hooked to wp_enqueue_scripts which has either wp_enqueue_script or both wp_register_script and wp_enqueue_script in it. Something like the following from the Codex: function themeslug_enqueue_script() { wp_enqueue_script( ‘my-js’, ‘filename.js’, false ); } add_action( ‘wp_enqueue_scripts’, ‘themeslug_enqueue_script’ ); You will need to find that callback function in your theme or in … Read more
Simply having a header.php in your theme’s folder will not output your header to the browser. You have to call the header too. To call the header.php file, you should use get_header(); at the top of almost every template (Almost!) such as page.php, single.php, archive.php and so on. Do the same for footer.php to get … Read more