Image displaying differently from the listing and actual post

Hi there,

Im trying to have image displaying differently from the listing and actual post on my website. I tested it on one of my blog posts and removed my featured image my post, set it’s post format to standard, but than that image was removed from my listing. I would like to keep a different image for my listing which appears on my homepage and media page but when the user clicks the actual post they get a different featured image on top.

Hello Carolina,

Thanks for posting in!

The Acquisition Analyst Intern is a page using Blank - No Container page template and it does not have a featured image. This has a different layout with the posts. What you need is to create a Post Template almost the same as the Blank - No Container page template so that you can apply it to your posts.

Since you have your child theme active and ready, please follow these steps below:
1] Using Notepad or TextEdit or Sublime Text or any text editor, please create a new file in your local machine.
2] Insert the following code into that new file

<?php

// =============================================================================
// TEMPLATE NAME: Blank - No Container for Posts
// TEMPLATE POST TYPE: post
// -----------------------------------------------------------------------------
// A post template with no featured image, blank and no container.
// =============================================================================

get_header();

?>

  <div class="x-main full" role="main">
    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
      <div class="entry-content">

        <?php while ( have_posts() ) : the_post(); ?>
          <?php the_content(); ?>
          <?php x_link_pages(); ?>
        <?php endwhile; ?>

      </div>
    </article>
  </div>

<?php get_footer(); ?>

3] Save the file named as custom-post-template.php
4] Upload this file to your server in the child theme’s folder wp-content/themes/pro-child/
5] When you edit the post, you will need to select the “Blank - No Container for Posts template” in the Post Attributes metabox so that you can start editing the post adding the big hero section.

We would loved to know if this has work for you. Thank you.

Thank you for this detailed answer what Im struggling with is finding/using “Notepad or TextEdit or Sublime Text” are these plugins? or are they located somewhere within the wordpress dashboard?

Hello Carolina,

Thanks for updating the thread. :slight_smile:

They all are text editors that help you to edit the codes. To learn more, please take a look at following resource.

https://hackernoon.com/sublime-text-101-a-quick-overview-for-beginners-7cc5cd1dd9bb

Thanks.

Thanks for the quick reply that article helped a lot, I downloaded sublime and did steps 1-3 but where do I located step 4:4] Upload this file to your server in the child theme’s folder wp-content/themes/pro-child/…Where is this found on the wordpress site?

Hello Carolina,

Thanks for updating the thread. :slight_smile:

Okay, to upload the file on the server you will need FTP access. If you haven’t already please install and setup child theme (you can download child theme from Apex members area). After that please use software like Filezilla and upload the file inder /wp-content/themes/pro-child/.

Here’s a resource to help you get started with Filezilla:

You can use following resources to download and setup child theme.

Download Child theme from following source: https://theme.co/apex/child-themes

Please take a look at following article to setup child theme:

Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.