Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #438623

    Hi guys, is there any way to use custom fields in the blog post/slider/grid/masonry list shortcodes on Enfold?

    I have a page setup which pulls posts from my custom post type/taxonomy using the masonry element, but it only has options to show the title/excerpt etc. I have some other custom fields which I’d also like to show below the title and excerpt.

    Please can you tell me how I can include the extra custom fields. I presume I would need to create a function or filter to hook into the shortcode, but I’m not sure how to do that. Please can you help?

    Any advice is greatly appreciated!

    Thank you
    Duncan

    #439477

    Hey Duncan!

    Yes, it’s possible. You’d need to edit the respective shortcode file (/config-templatebuilder/avia-shortcodes/) and include the meta value somewhere in the shortcode output.

    Play with it and feel free to ask any questions regarding this but please be specific on what element you’re using.

    Cheers!
    Josue

    #439631

    Thanks Josue, I’ll have a go at including the meta key into the shortcode.

    Ideally I’d like to create a function which does this, so that future updates of Enfold don’t overwrite the changes to the shortcode. Would that be possible? I’ll have a play and will reply back if I can’t get it work properly.

    I know this may come under ‘customisation’ rather then theme support, but I’d really like to learn how to do it myself.

    Thanks again for your help!
    Duncan

    ———-
    UPDATE
    ———-
    Ok, working with the masonry shortcode (masonry_entries.php), I can see that I need to add the meta values to $items (around line 620). Please can you tell me how I can create a function in my child theme which adds the meta values to that variable on line 620?

    • This reply was modified 9 years, 5 months ago by Dunc R.
    #439849

    Hi!

    There are no available hooks around that afaik so you’d need to overwrite the element source from your child theme, refer to this article:
    http://kriesi.at/documentation/enfold/add-new-or-replace-advanced-layout-builder-elements-from-child-theme/

    Regards,
    Josue

    #642452

    Hi!!!
    How can i change in masonry layout?
    Like i want to add category of post as sub-heading on top of main heading and i want to add author with date, like in screenshot
    http://take.ms/3i9fM

    Thanx

    #642567

    Hi,

    You’d need to edit /config-templatebuilder/avia-shortcodes/helper-masonry.php can you post a link to your site so we can take a closer look?

    Best regards,
    Josue

    #642574

    Thanx @Josue for your reply
    Actually I am working in Child theme, means i do not want updates to disturb my work in future…….
    I already know about where i could make changes actually, but I don’t know how to handle this case living in child theme. Hope you can help me someway.
    Site link is not yet available, i am working on localhost……
    Regards!!!

    #642752

    Hi,

    Duplicate helper-masonry.php in your child theme and include it from your child theme functions.php:

    require("helper-masonry.php");
    

    Best regards,
    Josue

    #642835

    Oh, Thank you so much @Josue, that was pretty simple, (y)

    #642912

    You are welcome, glad to help :)

    Regards,
    Josue

    #650169

    Hi once again!
    We have added helper-masonry.php through child theme functions.php and made changes in that file living in child theme….
    can we add blog.php for modication as well to make changes in child theme?
    Regards

    • This reply was modified 8 years, 3 months ago by hiddenpearls.
    #650396

    Hi,

    /config-templatebuilder/avia-shortcodes/blog.php uses /includes/loop-index.php:

    get_template_part( 'includes/loop', 'index' );
    

    So that’s the file you’d want to mod.

    Best regards,
    Josue

    #650701

    Thanks once again

    #651692

    Hi,

    glad we could help. Let us know in a new ticket if you have some more questions related to the theme. We are happy to assist you.

    Best regards,
    Andy

Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘Masonry / blog post list with custom post type and custom fields’ is closed to new replies.