Support Forum » User Profile

Forum Replies Created

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • in reply to: Elementor - Listing Chosen Posts #48260
    Simon FeldmanSimon Feldman
    Participant

    Hiya I thought I'd share the query which got this to work if you want to reference it elsewhere for users trying to do the same.

    Using the post field and set it up as cloneable if you want multiple internal links.
    Custom field ID of mb_lnk_int
    Use a post widget of your choice and the custom query "mb_internal_links_filter"

    Then create this snippet

    
    /**
     * Filter to get posts referenced in the mb_lnk_int MetaBox post field
     * This function retrieves posts linked in the current post's mb_lnk_int field
     * 
     * @param array $query_args The original query arguments
     * @return array Modified query arguments
     */
    function filter_internal_linked_posts($query_args) {
        // Get the current post ID
        $current_post_id = get_the_ID();
        
        // If no current post ID is available (like on archive pages), return original args
        if (!$current_post_id) {
            return $query_args;
        }
        
        // Get the linked posts from current post's meta field
        $linked_posts = get_post_meta($current_post_id, 'mb_lnk_int', true);
        
        // If no linked posts or empty value, ensure no results by using non-existent ID
        if (empty($linked_posts)) {
            $query_args['post__in'] = array(0); // Will return no results
            return $query_args;
        }
        
        // Convert to array if it's a single value
        if (!is_array($linked_posts)) {
            $linked_posts = array($linked_posts);
        }
        
        // Set up query to get only the posts that are referenced in current post's mb_lnk_int
        $extra_query = array(
            'post__in' => $linked_posts,
            'post_type' => 'any', // Get any post type that is referenced
        );
        
        // Merge with existing query args, prioritizing our filter
        $query_args = array_merge($query_args, $extra_query);
        
        return $query_args;
    }
    add_filter('mb_internal_links_filter', 'filter_internal_linked_posts');
    
    in reply to: Elementor - Listing Chosen Posts #48217
    Simon FeldmanSimon Feldman
    Participant

    Hey Peter, thank you so much for getting back to me so quickly. Is it possible to use it for a search query in in a filter? And for it to just return the query for posts from that specific custom field for that post onlyand not the whole website?

    I hope you can understand what I’m trying to achieve here. Being able to pull the post from that custom field. I can use a different widget that displays posts using a search query/filter then I’ll be able to get all that data that I need and display it with the featured image.

    Thank you again for all your help is really appreciated if I can leave feedback or review somewhere to help you guys please let me know. All the best, Simon.

    in reply to: Elementor - Listing Chosen Posts #48207
    Simon FeldmanSimon Feldman
    Participant

    Hi Peter,

    Thanks for getting back to me so quickly.

    I'm happy with how to use the skin and choose one.

    My questions is how do I pull the post link for the button of a skin, the featured image and the excerpt?

    in reply to: Elementor - Listing Chosen Posts #48197
    Simon FeldmanSimon Feldman
    Participant

    Some images for reference:

    in reply to: Conditional Logic - Geo Fields - Fault #48148
    Simon FeldmanSimon Feldman
    Participant

    Hi Peter,

    I think when I export not all the custom fields export with it so that would be missing data.

    Can you try one of the fields in the location tab,

    That gets it's data from the search field, e.g. binding > formatted_address + address_field > address_loc

    Then set con logic on that field to mb_loc_tog > 1

    Then it will stop working?

    Sorry think a bit of confusion over the forum.

    in reply to: Conditional Logic - Geo Fields - Fault #48131
    Simon FeldmanSimon Feldman
    Participant

    Hi Peter,

    How are you? Seems like there's been alot of work going on behind the scenes so thank you!

    <b> File with Con Logic Fault </b>

    So the file to try is here: https://tmpsend.com/i3sVL9db

    Go to > add new post > location > toggle switch (mb_loc_tog)

    Now you see all the fields dissapear and appear correctly with conditional but the fields won't fill the data.

    <b> Working without con logic</b>

    Try the tab activity, I haven't setup con logic on the address fields for that one and they work

    <b> Tab Style Fault </b>

    Once I introduce the con logic to the address fields the tab layout doesn't save in the overall settings, I usually style it as seamless and left tabbed, once I introduced con logic to these address fields that doesn't save and it reverts to the above tab and as a meta box.

    Thanks for all your help on this! I understand there's alot in here so thank you for your help.

    in reply to: Conditional Logic - Geo Fields - Fault #48057
    Simon FeldmanSimon Feldman
    Participant

    As if I use the group workaround I then can’t use the meta data in my search filter.

    in reply to: Quick Question - Merging Fields #48055
    Simon FeldmanSimon Feldman
    Participant

    Thank you, what I’m trying to achieve is create a field for a telephone number then another field using that data that begins with tel: so I can use that for the link.

    With other url meta fields in elementor I can prepend the url field using the; before, after, fallback box.

    However with MetaBox urls you don’t get that option. Can that be looked into then it’d allow one field to be adjusted to be used as a tel: or mailto: link.

    in reply to: Conditional Logic - Geo Fields - Fault #48054
    Simon FeldmanSimon Feldman
    Participant

    That’s really useful thank you very much! 😃

    Any idea about the conditional logic fault?

    Simon FeldmanSimon Feldman
    Participant

    Looking forward to this fix

    in reply to: Just Upgraded - And problems straight away #48041
    Simon FeldmanSimon Feldman
    Participant

    Thank you, I found a previous version on this forum which I’ve backdated to and solves the problem.

    Really would appreciate the previous versions to be listed for AIO like they are for the lite on WordPress repository.

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