Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #741399

    I’ll be adding a custom meta box (ie: client name) for the portfolio posts. I’m familiar with the process of adding the meta box as well as adding the code to the loop to display the text specified in the meta box.

    What I want to happen is display the custom meta box text content above the title when using the masonry portfolio. I wan’t able to find the loop I was looking for. Can you provide me guidance on how to accomplish this task?

    Thanks a bunch!

    #741414

    Hi CreativeFedora!

    Please go to enfold/config-templatebuilder/avia-shortcodes/av-helper-masonry.php and add your custom field above following line

    
    $items .=	"<h3 class='av-masonry-entry-title entry-title' {$markup}>{$the_title}</h3>";

    We would recommend you to use a child theme – http://kriesi.at/documentation/enfold/using-a-child-theme/ and apply the changes there – http://kriesi.at/documentation/enfold/add-new-or-replace-advanced-layout-builder-elements-from-child-theme/

    Cheers!
    Yigit

    #741496

    Thanks for the guidance. I got the custom meta displaying on the portfolio post page.

    However, I’m getting a syntax error, unexpected identifier (T_STRING) when I add the snippet to retrieve the meta box data when I add it to the av-helper-masonry,php file.

    This is what I got going:

    $items .=	"<?php echo get_post_meta($post->ID, "client", true); ?>";
    $items .=	"<h3 class='av-masonry-entry-title entry-title client-name' {$markup}>{$the_title}</h3>";
    #741505

    Hey!

    Please change your code to following

    $items .=	"<span class='custom-content'>". get_post_meta($post->ID, "client", true). "</span>";
    $items .=	"<h3 class='av-masonry-entry-title entry-title client-name' {$markup}>{$the_title}</h3>";

    Cheers!
    Yigit

    #741514

    I appreciate the quick responses!

    Is there anyway to include echo in front of get_post_meta()? In my experience echo is needed to display the meta box text on the front end.

    #741773

    Hi,

    That would throw error. If you are using a plugin such as – https://www.advancedcustomfields.com/, please refer to their documentation – https://www.advancedcustomfields.com/resources/
    We do not mind taking a quick look however such customization is really out of the scope of our support unfortunately.

    Best regards,
    Yigit

    #742012

    Thanks for the lead. I’ve implemented the plugin to no avail. I’m going to have to move forward from this. It would of been a fine feature to able to include a client name above the project title. Thanks for all your help.

    #742393

    Hi,

    Please feel free to request – or vote if already requested – such feature on Enfold feature request form.

    For your information, you can take a look at Enfold documentation here – http://kriesi.at/documentation/enfold/
    And if there are features that you wish Enfold had, you can request them and vote the requested ones here – https://kriesi.at/support/enfold-feature-requests/
    For any other questions or issues, feel free to post them here on the forum and we will gladly try to help you :)

    Best regards,
    Yigit

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Custom Meta Box’ is closed to new replies.