0

I want to display my custom fields on the Posts page just next to the author’s details, date, and any other meta data of post in the listed posts.

I already have done this in Magazinenp theme ( ID:, Pages:, Format:) all these three are custom fields and display on the Posts page successfully. Basically in Magazinenp theme, I add the code in the templates-parts .parts .entry-meta.php In comment div

<?php echo get_post_meta($post->ID, ‘ID:’, true); ?>
<?php echo get_post_meta($post->ID, ‘Format:’, true); ?>
<?php echo get_post_meta($post->ID, ‘Pages:’, true); ?>

and it works fine.

but on Hestia theme don’t know where to put this code.

please suggest to me any other code or anything relative.

1
  • Making customizations the commercial themes is NOT recommended, since they'll be erased if the theme is ever updated.
    – Pixelsmith
    Jul 13 at 22:53
0

First, making customizations commercial themes is NOT recommended, since they'll be erased if the theme is ever updated.

It's better to use a child theme in order to make custom modifications: https://docs.themeisle.com/article/656-how-to-create-a-child-theme-for-hestia

Second, if this is the theme you mean, then you'll need to put the custom fields in either template-parts/content.php, template-parts/content-alternative.php or template-parts/content-alternative-2.php, depending on which of the theme options you've chosen.

1
  • 0 I am already using a child theme. and already put and try the code in template-parts/content.php, template-parts/content-alternative.php or template-parts/content-alternative-2.phpin the HESTIA theme file but it did not works. still, custom fields are not visible on the posts page. Jul 15 at 6:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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