Single Sidebar; multiple templates! How?
Single Sidebar; multiple templates! How?
Single Sidebar; multiple templates! How?
Here’s how you do it… It’s quite extensive. I have no idea if this is the best way or not, – but this is how I solved it. There might be a couple of errors in the code. But it works for me. This is a quite specific wish for a functionality. Another way to … Read more
Developing a theme is pretty safe. You won’t wreck anything. The minimum you need is style.css with the following header: /* Theme Name: example */ Then save your html file as index.php and add that too. If you have an html file and save it as a php file, it’ll be fine. If it contains … Read more
I added 3 more pages to my site, one for each sequences that I wanted in the report. Then added a parameter to the shortcode in each page specifying the desired sequence and modified the function handling the shortcode to pass the parameter to the function building the report. Then just redirected to the page … Read more
few things here: 1) Your WP_Query args doesn’t look good, the proper way of querying posts by taxonomy should be: $splash_page_args = array( ‘post_type’ => ‘page’, ‘posts_per_page’ => ‘3’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘category’, ‘field’ => ‘slug’, ‘terms’ => ‘splash-homepage’, ), ), ); 2) Is there any particular reason why you’re using foreach … Read more
sure it is possible. Just check the page meta field (assuming you’re in the loop): $template = get_post_meta( get_the_ID(), ‘_wp_page_template’, true );
A simple solution for you – this hook will send you a full URL to the post that is being published. Don’t forget to update [email protected] function post_published_notification( $ID, $post ) { $permalink = get_permalink( $ID ); // GETTING THE PERMALINK $to[] = ‘[email protected]’; // UPDATE THIS $title = $post->post_title; $subject = sprintf( ‘Published: %s’, … Read more
How to publish pages under a subdomain url?
WP pages content is missing in frontend
By using wp_query you can have more control: $title = “your title” $q = new WP_Query (array( ‘posts_per_page’ => 1, ‘title’ => $title, )); And then you can iterate through, but because we used posts per page 1 you’ll get only 1 item. By default wp query displays the last first by date, you can … Read more