Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I'm not 100% certain I understand what you're trying to achieve but if you'd like to output your custom post items to a specific page, you can create a custom page template and assign it to a new page. </p> <p>Let's say you wanted to output all team members to a specific page, you could save this as a template file to your theme directory:</p> <pre><code>&lt;?php /* Template Name: List Team Members */ ?&gt; &lt;?php $loop = new WP_Query( array( 'post_type' =&gt; 'team-member', 'posts_per_page' =&gt; -1, 'orderby' =&gt; 'title', 'order' =&gt; 'ASC' ) ); ?&gt; &lt;?php while ( $loop-&gt;have_posts() ) : $loop-&gt;the_post(); ?&gt; &lt;div class="team-member"&gt; &lt;h2&gt;&lt;?php the_title(); ?&gt;&lt;/h2&gt;&lt;!-- display post title --&gt; &lt;p&gt;&lt;?php the_content(); ?&gt;&lt;/p&gt;&lt;!-- display post content--&gt; &lt;p&gt;&lt;?php echo get_post_meta($post-&gt;ID,'team-member-contact-info',true) ?&gt;&lt;/p&gt;&lt;!-- display custom field 'team-member-contact-info' --&gt; &lt;/div&gt; &lt;?php endwhile; ?&gt; </code></pre> <p>You can be more selective by adjusting the qp_query. Also, the get_post_meta part is in case your custom post type is using custom fields. You'll also want to include the calls for the header and footer plus any other html needed to match your current theme but this should give you the idea.</p> <p>Once that's uploaded to your theme directory, create a new WP page via the editor and select the "List Team Members" template and hit publish.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload