Skip Navigation

[Resolved] Post meta data show before the template

This support ticket is created 6 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 3 replies, has 3 voices.

Last updated by Waqar 6 years, 1 month ago.

Assisted by: Waqar.

Author
Posts
#1158534
divi.jpg

I am trying to: Create a content template for a CPT. It all worked really well, I used the DIVI builder to create the content template. When I created a post to test it, I saw the post title and meta data before the template I created + the featured image.

By inspecting the code, I saw that an et_post_meta_wrapper was added and I don't know where it comes from. Can you help please?

Also, I was trying to edit the content template without the Divi builder to add the featured image field instead of a background image for one of the column, is it possible to do that?

Thanks,

#1158609

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Xavier

The "post meta" you see there is additional data about the post (rather than custom fields stored in wp_postmeta) which Divi adds to posts.

You can disable all or parts of this in the Divi settings (screenshot), but this would apply to all posts, not just posts of some custom type, for example. In that case the only option would be to hide that section with CSS.

If you want to use an image field, including the featured image, as a background to a Divi module or section, what you need to do is add a unique ID to that component when editing it in Divi, so that it can be targeted with CSS.

Then add the CSS styles for that ID "dynamically" by inserting a style block in a Divi text module, e.g.

<style type="text/css">
#unique-id {
  background: url("[wpv-post-featured-image output='url']");
}
</style>
#1159086

Hey Nigel!

Thanks for your quick and clear reply, that's great! I was able to take care of the background image after adjusting your css. For the post meta from Divi, I had to hide the <div> with CSS as even after disallowing the data from the Divi dashboard AND checking off the title from your dashboard, the title was still showing up. Any idea how that can be happening? I don't like hiding it through CSS as there's a little flash on the screen every time the time loads and it looks pretty bad. I also have a white section before the DIVI footer, more post meta data generated there.

Cheers,

#1159699

Hi Xavier,

Thanks for the update and glad Nigel's message helped.

He is away for a few days and I'll be following up on this ticket.

The title section with the class "et_post_meta_wrapper" is coming from the Divi theme's "single.php" file:
( screenshot: hidden link )

The "single.php" is the file that controls the output of single post pages and you can learn more about WordPress template hierarchy from this guide:
https://developer.wordpress.org/themes/basics/template-hierarchy/

To remove this only from the single post pages for type "diagnostic", you can copy this file in your active child theme's directory and rename it to "single-diagnostic.php" and then remove this title section from the code as needed.

For questions related to the theme's functionality and code, we'll recommend consulting its official support and documentation, for the most accurate and up-to-date information.

Note: you can use Google's inspect element tool to see the CSS styles which are resulting in the empty space, before the footer, as explained in this guide:
hidden link

I hope this helps.

regards,
Waqar