Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
  • #675728

    Hello I’m using the blog grid module inside a page and I wish to add meta from the single blog post to this grid when it’s displayed.
    How can I do this?

    I need to be able to fetch the meta from the single post to show it in the loop of the grid.


    Hey grafixstudio,

    not sure what you want to achieve. Can you send us precise links showing the elements you are talking about please?

    Best regards,


    Yes, it’s on this website and all of it’s sub-pages

    I want to display a custom field within the box (post).
    The custom field is of course set inside the original post.

    How do I do that?



    about which custom field are you talking about? can you highlight using screenshots please? use or dropbox.

    Best regards,


    The key:
    I want it visible here:



    does it work for you when using a default WordPress theme?

    Best regards,


    You misunderstand

    I need to know what file I need to edit and insert the field. I have managed to insert it in the single.php file, but I also want to show the price in the front so I need to know what file controls the grid blog layout.

    <?php echo get_post_meta( get_the_ID(), 'pris', true );?>

    This is what I’ve put in the single.php. Where do I put it so it shows up like the picture I sent you?

    Do you get me?


    Any answer?



    Please go to Enfold/config-templatebuilder/avia-shortcodes/postslider.php file and find

    					$output .= !empty($excerpt) ? "
    <div class='slide-entry-excerpt entry-content' $markup>".$excerpt."</div>
    " : "";

    and change it to following

    					$output .= !empty($excerpt) ? "
    <div class='slide-entry-excerpt entry-content' $markup>".$excerpt."</div>
    " : "";
    					$output .= get_post_meta( get_the_ID(), 'pris', true ); 

    If you are using a child theme, please see – (Purchase code hidden if logged out)(Purchase code hidden if logged out) -theme/

    Best regards,


    Yes, I did this now but nothing happens?



    Well, then there might be the issue in the way you are adding a custom field. Have you considered using Advanced Custom Fields plugin instead?

    Best regards,


    I’m using a plugin called AccessPress Anonymous Post Pro and that is what I need to use. It generates the key called “pris”
    But really, is it correct to just type in: $output .= get_post_meta( get_the_ID(), ‘pris’, true ); ??

    This is supposed to show the price on the front page. Where in this code does it fetch the information from the post in question?

    Example: First column is a preview, an excerpt. Inside this post are all the keys, right?

    With the code above, nothing is saying “get the information from inside the post”.

    Do you know what I mean?

    • This reply was modified 2 years, 6 months ago by  grafixstudio.


    The get_post_meta function should fetch any custom or meta fields of a post.

    If the function is not working, ask the plugin author what function to use to get the value of the field.



    Hey, they told me to contact you again.
    I believe they are right….

    Guys, listen…the keys work fine..If you check inside a post: you will see where it says:

    “Pris 1200kr”

    That’s the value of the field pris that we are talking about. So it works. But not in the post-slider. So it’s inside Enfold where the problem is….



    Which function did they use to get the value of the “pris” meta field? And did you add excerpts to the posts? If not, please edit one of the posts with the “pris” meta field then input something in the Excerpt module. If you can’t find the Excerpt module, enable it in the Screen Options.

    Best regards,



    I resolved the issue. the thing is that inthe postlider.php you have already declared a variable for get_the_id() – called $the_id

    So the correct code is:
    $output .= get_post_meta($the_id, 'pris', true );

    • This reply was modified 2 years, 6 months ago by  grafixstudio.


    Great, glad you got it working and thanks for sharing the solution :-)

    Please let us know if you should need any further help on the topic.


Viewing 17 posts - 1 through 17 (of 17 total)

You must be logged in to reply to this topic.