0

I want to customize my individual posts. I have an example of what I'm trying to achieve below. Would I make a custom post template for this? If so how would I do this? Or should I add to my single.php? Thanks in advance.

What I want my individual post pages to look like. I want two pictures side by side that are the full width of the page. Text. One picture that is the full width of the page. Text. One picture thats starts at the left edge of the page and has text next to it. And then one full width picture. enter image description here

Here is my single.php

<?php
get_header();
the_post_thumbnail('banner-image'); 
if (have_posts()) :
while (have_posts()) : the_post(); ?>
<article class="post">

<?php wpb_set_post_views(get_the_ID()); ?>    
    <div class="post-info">
    <h1 class="post-title"><?php the_title(); ?></h1>
   <h2 class="post-date"><?php echo strip_tags(get_the_term_list( $post->ID, 'location', 'Location: ', ', ', ' • ' ));?><?php the_date('F m, Y'); ?></h2>

    </div>
    <div class="post-content"><?php the_content(); ?></div>

<?php comments_template(); ?>
</article>
<?php endwhile;
else :
echo '<p>No content found</p>';
endif;
get_footer();

?>

Any insight would help. I know how I want it to look, I just don't exactly know how to achieve it.

2 Answers 2

0

Typically I would go with Custom Post Type. So if you create the custom post type moon you will have the create the single-moon.php file.

In there you would create the organization like you explained. This separates you from the regular posts.

In fact, you would need to work on your moon CPT, and to add custom fields, to your custom post type. Either acf or cmb2 would work for you.

I dislike the idea of post-formats, here is how they look in 2017-teen

add_theme_support( 'post-formats', array(
    'aside',
    'image',
    'video',
    'quote',
    'link',
    'gallery',
    'audio',
) );

because they are one day in and another day out. I think they are less popular than CPTs.

0

As of wordpress 4.7 page template are supported in any post type including "post". So you could create a page template and use it in the posts you want. https://developer.wordpress.org/themes/template-files-section/page-templates/

Not the answer you're looking for? Browse other questions tagged or ask your own question.