Support Forum ยป User Profile

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: โœ…Struggling with a Custom Endpoint #20216
    LockeLocke
    Participant

    Got it!

    check this out:
    https://pastebin.com/MR0mGF5q

    The only thing now I'm trying is to validate if the endpoint coexists in a page_template, but that doesn't seem to work:

    ...
            $menu_list = array();
            $menu_list["MenuList"] = $mb_menu;
            $not_available = array();
            $not_available["Status"] = 'Endpoint not available';
    
    if(get_page_template('page-menu.php')) {
                    return $menu_list;
    } else {
       return $not_available;
    }

    I don't know if I need to use all the PathURL for the get_template_path or is no logic to call that function for the endpoint (that I feel that is the right answer, lol).

    In another case which validation you recommend guys?

    Thank you

    in reply to: Coexisting with Option Tree #10464
    LockeLocke
    Participant

    Forget it ๐Ÿ™

    guess what I forgot ๐Ÿ˜›

    return $meta_boxes;

    ๐Ÿ™ sorry

    in reply to: Coexisting with Option Tree #10462
    LockeLocke
    Participant

    Thanks for the answer , well I get:

    Warning: Invalid argument supplied for foreach() in /var/www/html/wp-content/themes/theme-child/inc/plugins/meta-box/inc/core.php on line 53

    Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wp-content/themes/theme-child/inc/plugins/meta-box/inc/core.php:53) in /var/www/html/wp-admin/includes/misc.php on line 1116

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