Headers for Contact Form are wrong
Your ‘From’ header is not correctly formatted so it is defaulting to servers address. Try this… // create email headers $headers=”From: iStudioFX <[email protected]>” . “\r\n” .
Your ‘From’ header is not correctly formatted so it is defaulting to servers address. Try this… // create email headers $headers=”From: iStudioFX <[email protected]>” . “\r\n” .
Why that $pages suddenly became $myposts!!? Anyway, I really don’t see any big issues with your code, however, you can try this.. <?php $pages = get_posts(array( ‘post_type’ => ‘directory_listing’, ‘posts_per_page’ => -1, ‘tax_query’ => array( array( ‘taxonomy’ => ‘place’, ‘field’ => ‘slug’, ‘terms’ => ‘place1’, ‘include_children’ => false ) )) ); foreach ($pages as $page) … Read more
Welcome to WordPress development! It is a fantastic content management system. The normal way to display content for a particular page, on that page, is to use the WP function the_content();. This normally entails creating a simple WP loop to check for the existence of content, then perform certain actions (like creating the HTML to … Read more
Couple of notes: Your form action is incorrect: <form method=”get” action=”http://www.adoptapet.ie/archive-farm/”>. The page is <form method=”get” action=”http://www.adoptapet.ie/archive-farms/”> You should reorder your argument list for adopt_custom_taxonomy_dropdown(). As written, most of your arguments have default values and can be omitted when the function is called, except that as written argument five doesn’t have a default so you … Read more
On the page where you want to set the cookie write this code and check if(get_query_var(‘my_var’) == ‘somevalue’){ setcookie(‘my_cookie’, get_query_var(‘my_var’), strtotime(‘+1 day’)); } If we go with your code then it will set coookie on every page who having query variable ?my_var=somevalue
You don’t want to add function vote_up() { […] } at the top of every post if you display more than one post on a page. You want to declare the vote_up() function in your plugin’s PHP file. Once the plugin declares the function, as long as the plugin is active, you can just call … Read more
Edit a custom admin page
You could just make an easy counter – Untested though. <?php else : ?> <?php global $wp_query; ?> <?php $ads = 0; ?> <?php if ($ads < 3 && (($wp_query->current_post + 1) % 5 == 0 )): ?> <div class=”box”> <adsense code> </div> <?php $ads++; ?> <?php endif; ?>
when a page is set to be the posts page, then the ‘page_for_posts’ option will contain the page id of that page; in this case, you can output the featured image with: if( is_home() && get_option( ‘page_for_posts’ ) echo get_the_post_thumbnail( get_option( ‘page_for_posts’ ) );
The PHP Manual, specifically file_put_contents will point you in the right direction. My suggestion is to write the name/value pairs to an array, insert a comment at the top of a blank CSS file and add an import directive to the master style sheet until you test the output, then dump the array into the … Read more