1

i've created my own metabx. You can select items (shortcodes) from my plugin und these shortcodes return html code. How can i remove the complete a-Tag from my own meta-box content?

meta_box

add_meta_box(
        'name',
        __('NAME'),
        array( Plugin_WP_NAME_Navigation, 'nav_menu_link'),
        'nav-menus',
        'side',
        'low'
    );

filter

 add_filter('wp_nav_menu', 'do_shortcode');

output

<li itemscope="itemscope" itemtype="https://www.schema.org/SiteNavigationElement" id="menu-item-1008" class="menu-item menu-item-type- menu-item-object- menu-item-1008"><a title="HTML CODE HERE</li>

i don't need the a-tag

1
  • The third parameter is a callback function that should echo the content of your meta box. I guess the problem starts there.
    – realloc
    Commented Sep 13, 2018 at 15:58

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.