How to display list of WordPress custom post types? -


I am using WordPress 3 and I have created a custom post type that the article has been written, My website / article / article title. How do I view all article entries in the url website / articles?

Assume that you set up everything properly and you see the post type on a public template page See this code in mycustomtemplate.php or eqivilate.

  & lt ;? Php $ loop = New WP_Query (array ('post_type' = & gt; 'article', 'post_pages' = & gt; 10)); ? & Gt; & Lt ;? Php while ($ loop-> is_pause ()): $ loop-> The_post (); ? & Gt; & Lt ;? Php the_title ('& lt; h2 class = "entry-title"> , '& lt; / a & gt; & lt; / h2 & gt;'); ? & Gt; & Lt; Div class = "login-content" & gt; & Lt ;? Php the_content (); ? & Gt; & Lt; / Div & gt; & Lt ;? Php timeline; ? & Gt;  

You can customize the loop as you would blog posts and pages if you want to get all the pages on one page, you can call it at post_per_page I want to remove the limit, though I do not recommend it. I would say that set it up to 50 or 100 and still use pages

source:


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -