Tagged: , , ,

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1484181

    Is there an easy way to adjust the blog post element where when using the grid display option, we can choose another field? I am using it to display a GeoDirectory Places cpt.

    Let me know if you would like admin access to see what is available and how things interact.

    #1484201

    Hey Jason,

    Thank you for the inquiry.

    Which field are you trying to select? This is not possible at the moment, but you can try modifying the blog posts query using the avia_post_slide_query filter.

    Example:

    add_filter( 'avia_post_slide_query', 'avf_custom_avia_post_slide_query', 10, 2 );
    function avf_custom_avia_post_slide_query( $query, $params ) {
        $query['meta_query'] = [
            [
                'key' => 'your_acf_field_key',  
                'value' => 'desired_value',     
                'compare' => '=',            
            ]
        ];
    
        $query['orderby'] = 'date';
        $query['order'] = 'ASC';
    
        return $query;
    }

    Best regards,
    Ismael

    #1484243

    Good day, Ismael!

    Thank you very much for the time and sharing this. I will try it, but am wondering if there would be some way to close the blog element and adapt it, so it can be used as a regular element (with specific changes. The primary reason is in the desire to build a framework for community sites going forward, where this would be a common need, and having an actual element means that adapting another that might be used would not limit that element’s capabilities in various use cases. Hopefully that makes sense.

    It has been a long time since I looked at adapting an ALB element, and know that a ton has probably changed. Is something like this possible today? Or, are there mechanisms coming down the road that might enable this to be an easier adaptation?

    If adapting this is possible, could you recommend a good starting point? I do use child themes be default, so wondering if it could just be a function of calling a customized element from within, or would it mean having to adapt the core theme files?

    #1484273

    Hi,

    It’s possible to create custom builder elements or shortcodes in the child theme, but you’ll need to implement them on your own because this is beyond the scope of support. You can find more information in the documentation below:

    https://kriesi.at/documentation/enfold/intro-to-layout-builder/#add-elements-to-alb

    You can use the enfold/config-templatebuilder/avia-shortcodes/blog element as a reference or starting point.

    Best regards,
    Ismael

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.