Functions For Calling Specific Elements

It sounds like get_template_part() would do the trick. In element.php you could simply call get_template_part( ‘element-item’ );, which would then include the element-item.php file from your theme. You could wrap this up in a function if you wanted to, e.g. get_element(). function get_element() { get_template_part( ‘element-item’ ); } This approach would allow you to add … Read more

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