Any Ideas for Including “More Tag” with get_pages($args)?

Here’s the code I am using (successfully): $pages = get_pages($args); foreach( $pages as $page ) { $content = $page->post_content; // Get content parts $content_parts = get_extended( $content ); if ( ! $content ) // Check for empty page continue; $content = apply_filters( ‘the_content’, $content ); ?> <h2><a href=”https://wordpress.stackexchange.com/questions/258494/<?php echo get_page_link( $page->ID ); ?>”><?php echo $page->post_title; … Read more

Page redirects to archive

It seems like you have the same slug “news” for custom post type and page. If it is the case, I would like to recommend to change the slug for custom post type to something like “cpt_news” or anyone that you think is best.

get_pages() & “child_of”

You are using it at wrong place, You can use the same function in page.php and if you want to use it in single.php then you have to pass static pageId as parameters. Right now you are passing $post->ID which will return post id of current article and Articles does not have any relation with … Read more

How can I get the homepage from the loop?

That depends on what your trying to do. If you want to get the page content in another template or functions file and your home page is a page that you created in the dashboard and set as the static front page you can use get_page_by_path function like this: get_page_by_path(‘the_path_of_the_page’); // Usually will be ‘home’ … Read more