0

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

1

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.

  • nicely explained! – Qaisar Feroz Apr 28 at 17:10
  • Can you create that exstension for elementor? – Antonio Online Apr 29 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 at 20:48

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.