Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to add custom post type into a page with additional text/graphics in WordPress?
    primarykey
    data
    text
    <p>I created a custom post type of boxes with logos &amp; text running four to a row. I created a working post archive for this, but now I need to bring these into another page that has additional text and images before and after where the custom post type needs to display. What's the correct way to do this?</p> <p>My basic page template:</p> <pre><code>&lt;?php /* Template Name: Work */ get_header(); ?&gt; &lt;div id="body"&gt; &lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&gt; &lt;?php the_content(); ?&gt; &lt;?php wp_link_pages(array('before' =&gt; 'Pages: ', 'next_or_number' =&gt; 'number')); ?&gt; &lt;?php endwhile; endif; ?&gt; &lt;/div&gt; &lt;?php get_footer(); ?&gt; </code></pre> <p>Here is the archive php which I'm trying to get to display in the page template:</p> <pre><code>&lt;?php get_header(); ?&gt; &lt;div class="post"&gt; &lt;?php if (have_posts()) : ?&gt; &lt;?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?&gt; &lt;?php /* If this is a category archive */ if (is_category()) { ?&gt; &lt;?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) &amp;&amp; !empty($_GET['paged'])) { ?&gt; &lt;?php } ?&gt; &lt;div id="body"&gt;&lt;h2&gt;Case Studies&lt;/h2&gt;&lt;/div&gt; &lt;?php while (have_posts()) : the_post(); ?&gt; &lt;div&lt;?php post_class('margin') ?&gt; id="post-&lt;?php the_ID(); ?&gt;"&gt; &lt;div class="casestudy"&gt;&lt;a href="&lt;?php the_permalink() ?&gt;" class="anchor-hover"&gt; &lt;?php echo get_the_post_thumbnail( $post-&gt;ID, '180,180' ); ?&gt; &lt;span class="details"&gt; &lt;div class="anchor-hover details-h3"&gt;&lt;?php the_title(); ?&gt;&lt;/div&gt; &lt;p class="desc"&gt;&lt;?php echo get_post($post_id)-&gt;post_excerpt; ?&gt;&lt;/p&gt; &lt;/span&gt; &lt;/a&gt; &lt;/div&gt; &lt;?php endwhile; endif; ?&gt; &lt;div class="clear"&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;?php get_footer(); ?&gt; </code></pre>
    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.
 

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