• Resolved lamse

    (@lamse)


    In the function below, we need to check the page as follows.

    public static function wp_nav_menu_objects( $items ) {
    $new_items = array();

    foreach ( $items as $item ) {
    if ( isset( $item->object_id ) && $item->object == “page” && self::get_target( $item->object_id ) ) {
    $item->target = ‘_blank’;
    }

    $new_items[] = $item;
    }

    return $new_items;
    }

    • This topic was modified 5 years, 10 months ago by lamse.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘When a new tab is checked on the page, a new tab is also applied to the menu’ is closed to new replies.