Display content on Single page

Unless you have generated metafields called ‘home’, ‘about’, ‘contact’ and ‘services’ in functions.php using add_post_meta your calls to get_post_meta will always return false. So if you test if they are true later on, the answer is ‘no’ and nothing will be displayed.

Creating Slider in wordpress theme with custom post

Perhaps in your post loop you would need to add a condition that checks for post type, using the get_post_type() function. So something like this: <?php if(have_posts()) : ?> <?php while(have_posts()) : the_post(); ?> <?php if(get_post_type(get_the_ID()) === ‘your custom post type’) : ?> //Your slider code with current post data <?php endif; ?> <?php endwhile; … Read more

Display grandchild page content on parent page

From your question I understand that inside the top level page you want to indicate which child page to include. The obvious way to do this is using a shortcode. So in your functions.php you would have something like this: add_shortcode( ‘insert_child’, ‘wpse240522_insert_child’ ); In the content of your top level page you would have … Read more

Category Archive not working for pages

Your code did work for me; I was able to see pages under the category archive for Association Landing Pages at http://domain.com/category/association-landing-pages. It sounds like you need to use the URL: localhost/mywordpressitefolder/category/association-landing-pages I noticed that you said that the slug was association-landing-pages and then you visited localhost/mywordpressitefolder/association-landing-page (without the s). Make sure to use the … Read more

Get child pages in get_pages function

There is a function get_page_children available for this purpose, have a look on the documentation and examples. https://codex.wordpress.org/Function_Reference/get_page_children