I ask a question that I think many people are interested in knowing the answer.

What I really can't do with wordpress is to insert custom meta or dynamic custom fields into the post boxes (on the archive page)

I don't know if I'm explaining myself well, but I made a screen to show what I intend to do.

I would like to know how to do it directly on wordpress with any theme and if it is possible also with elementor which is a plugin that I use a lot.

For example, with the ACF plugin custom fields can be created, with elementor I can use ACF dynamically creating individual pages which are then dynamically updated based on how the contents change in the various custom fields placed on the page.

It would be great to include custom fields such as "time to read - 5 min." inside the boxes of the post list of articles, or insert an icon as desired only in certain posts (I always mean above the boxes, inside the box of the single post where there is the image, the title, brief description, date and button read more.

Can anyone help me?enter image description here

  • I had the same problem for months and I couldnt find the solution until I find out this method with elementor skin. Ofcourse the only paid plugin that you wiil need is elementor PRO . Nothing else! – David Sots Jan 7 at 20:20

I think "how" depends mostly on the theme (or page builder plugin) you're using.

If the posts section is hard-coded to a page or an archive template then you could copy the template to a child theme and make the required changes to the copied file.

If the post boxes are template_parts or they are made of multiple template_parts, then copy the correct file/s to your child theme and edit the copy/ied file/s.

If there are actions or hooks for editing the post boxes' layout/content available, you can use them.

I guess you could also (ab)use wp_localize_script to get the meta data to front-end, and then insert the data with necessary html to the correct post boxes with vanilla javascript or jquery.

If the posts section is created with a (page builder) plugin, then refer to the plugin documentation or ask help from the plugin author. Perhaps you can extend the plugin with a custom addon that adds a posts section/grid that matches your needs. Elementor docs for extending the plugin.

| improve this answer | |
  • nicely explained! – Qaisar Feroz Apr 28 '19 at 17:10
  • Can you create that exstension for elementor? – Antonio Online Apr 29 '19 at 15:34
  • @AntonioOnline Do you mean as a custom order matching your needs? For a fee, yes, but at a later date as I'm fully booked at the moment. – Antti Koskinen Apr 29 '19 at 20:48

You need

  1. Advance custom field
  2. Taxonomy
  3. little bit PHP coding

You should find "blog template/ blog layout" in your theme folder / look for the grip wrap, your theme might have many layout to show the blogs and you need to find the GRID.

make the "field", like : Holiday-option , Day duration in your advance field and fill it up in your Tour page.

you may edit your "blog template" and call your input data


<div class="tourprice"><?php echo 'Price: ' ; the_field( 'price' ) ?></div>
<small><?php the_taxonomies(); ?></small>
| improve this answer | |

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.