Displaying Subpages while on Parent page?

This is pretty easy, as WordPress sets css classes for the parent pages. Default we hide all sublists (ul) from the menu with .menu ul { display: none; } Then when the parent page is selected we use the css classes that are set by WordPress to show the sublists again. .menu .current_page_ancestor, .menu .current_page_parent … Read more

post categories

You could simply use the category pages WordPress generates using the category.php template, or category-{slug}.php. If you don’t like the /category/categoryname/ url format WP uses, there are a few plugins that remove the category base- I use Yoast SEO plugin for this, which gives you lots of other great features on top. Your other option … Read more

How to include the latest post of a specific category on a matching page

I have managed to solve this problem by creating my own code. In my content-excerpt.php template part, I have included the following, if(!is_page(‘Home’)){ $page = get_page(get_the_ID()); $custom = get_post_custom($page->ID); // I have added a custom field on the page, which contains the category id $custom_post = get_posts(array(‘numberposts’=>1, ‘category’=>$custom[‘Category Link’][0], ‘post_type’=>’post’, ‘post_status’=>’publish’)); $post = $custom_post[0]; } … Read more

Why aren’t my posts/pages showing up in my WordPress Theme?

Try this basic template layout <?php get_header(); # gets header.php contents if (have_posts()): # checks if there are any post available for this url while(have_posts()): # starts loop the_post(); # assigns $posts global the_title(); # outputs post title the_content(); # outputs post content endwhile; # ends loop endif; # ends conditional check get_footer(); # gets … Read more