Formatting latest posts

I have the home page set to display the latest posts, but how do I change the formatting? Right now it’s just displaying the excerpt, but I need any images and paragraph breaks and so on instead of the excerpt with the formatting removed. I need it to look like this:

but with the post image on top instead of to the right, like it currently defaults to.

So:

<center>
{post image}
{post title}
<small all caps>{date} by {author}</small all caps>
</center>

<left align>
 {post content with formatting}
</left align>

 <center>
<small all caps>
 POSTED IN: {categories}
 TAGGED: {tags}
</small all caps>
</center>

Hello @QuantaZelle,

Thanks for writing in!

By default the posts page or the blog index will display only the post excerpts. Any shortcod, custom html or paragraph formatting that you have used will be stripped out. Only the first 55 words displayed as plain text will be used for the post excerpts. This is the way how WordPress handles the excerpts automatically. If you want to display the formatting, you will have the option to display the full post content instead. Simply go to X > Theme Options > Blog > Content and enable the “Full Post Content on Index”.

Selecting the “Enable Full Post Content on Index” option below will allow the entire contents of your posts to be shown on the post index pages for all stacks. Deselecting this option will allow you to set the length of your excerpt.

Hope this helps. Please let us know how it goes.

I can’t change to Full Post Contetn because I’m getting the white screen of death:

Hi,

Please check for the following first:

  1. Ensure everything is up to date according to our version compatibility list at https://theme.co/apex/forum/t/troubleshooting-version-compatibility/195. Just note that the latest version as of now of the theme is Pro 2.3.8, X 6.3.8, Cornerstone 3.3.8. Please follow the best practices when updating your theme and plugins. See https://theme.co/apex/forum/t/setup-updating-your-themes-and-plugins/62 for more details.

  2. If you’re using a caching plugin, clear all caches including browser cache then deactivate your caching plugin and other optimization plugins.

  3. If you’re using a CDN, please clear the CDN’s cache and disable optimization services.

  4. Test for a plugin conflict. You can do this by deactivating all third party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.

  5. Remove custom CSS, Javascript and templates.

  6. Reset your htaccess file by renaming it to .htaccess-bak. Then in WP Admin Menu, go to Settings > Permalinks and just click the Save Changes button.

  7. Contact your host to increase your allocated memory or do it yourself by adding this code in your wp-config.php

define( 'WP_MEMORY_LIMIT', '512M' );
define( 'WP_MAX_MEMORY_LIMIT', '512M' );

Thanks.

OK, well, I moved it to my local site…

Now what?

Hi Quantazelle,

Is enabling the “Full Post Content on Index” did not achieve what you’re looking for? enabling the “Full Post Content on Index” will retain the formatting of your posts in the index.

If not, you need to create a Custom Blog Posts Index Page Template or have a static page and utilize the Essential Grid extension to create a custom posts grid.

Thanks,

OK, now I have it showing full post content. How do I now change the graphic in front of the title and put it above the title? I’m not sure which file to copy over to the pro-child theme and change…

I think it’s this file? If so, I can copy it over into the child directory, but then how do I add this image to be centered above the title, and the title to be centered as well.

Here is what I did, but it’s not working:

Hi @quantazelle,

It should be working, I tried it on my installation but with a different image. Could you confirm if your active stack is Renew as well? The only explanation for now is, the file is placed in the wrong folder (stack template path). I can’t verify it on your installation since it’s moved on local.

Let me know, Thanks!

Hmm…well, I uploaded it to the live set. Please check it out for me.

Hello @quantazelle,

Regretfully the given credentials does not work for us.
Please double check it again.

Thank you.

OK I changed it.

Hi There,

Currently, the directory is not correct: pro-child/framework/views/_content-post-header.php:

It should be like this: pro-child/framework/views/renew/_content-post-header.php. Please correct it.

Let us know how it goes!

OK! That was it!

Now, how is it that there is still the default x-pro icon to the left of the title, and the new image isn’t showing up above the title? It looks like I messed up the php call:

Hello @quantazelle,

Thanks for updating in!

I have logged in and checked your site. I ended up updating the code and use this instead:

<?php

// =============================================================================
// VIEWS/RENEW/_CONTENT-POST-HEADER.PHP
// -----------------------------------------------------------------------------
// Standard <header> output for various posts.
// =============================================================================

?>



<header class="entry-header">
  
  <div class="custom-image mbm" style="text-align: center"><img src="<?php echo site_url() . '/wp-content/uploads/lizrevision-swirl.png'; ?>"></div>
  
  <?php if ( is_single() ) : ?>
  
    <h1 class="entry-title"><center><?php the_title(); ?></center></h1>
  
  <?php else : ?>
  
    <h2 class="entry-title">
      <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to: "%s"', '__x__' ), the_title_attribute( 'echo=0' ) ) ); ?>"><center><?php the_title(); ?></center></a>
    </h2>
  
  <?php endif; ?>
  
  <?php x_renew_entry_meta(); ?>

</header>

Please check out your homepage now.

Cool, thanks! However, there is still the “page” icon to the left of the title.

To remove the icon from the title, please add this code in Pro > Theme Options > CSS.

.entry-title:before {
    display:none;
}

Hope that helps.

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