I have this bit of code that creates the menu items:

$menu_classes = apply_filters( 'astra_' . $theme_location . '_menu_classes', array( 'main-header-menu', 'ast-menu-shadow', 'ast-nav-menu', 'ast-flex', $submenu_class, $stack_on_mobile_class ) );

$items_wrap  = '<nav ';
$items_wrap .= astra_attr(
        'id'         => esc_attr( $theme_location ) . '-site-navigation-' . esc_attr( $device ),
        'class'      => 'site-navigation ast-flex-grow-1 navigation-accessibility site-header-focus-item',
        'aria-label' => esc_attr__( 'Site Navigation', 'astra' ),
$items_wrap .= '>'; 
$items_wrap .= '<div class="main-navigation ast-inline-flex">';
$items_wrap .= '<ul id="%1$s" class="%2$s">%3$s</ul>';
$items_wrap .= '</div>';
$items_wrap .= '</nav>';

$items_wrap .= '<ul id="%1$s" class="%2$s">%3$s</ul>';

and I want to know where %3$s is defined so I can modify it. What should I search for and in what file (or file type)?

Code above can be find in:


1 Answer 1


There should be a sprintf function somewhere, which has $items_wrap as its first argument.

The %3$s is merely the 3rd argument placeholder that gets replaced with something.

See » https://www.php.net/manual/en/function.sprintf.php

  • Thanks. I solved it by debugging. If I only could close my question I would do it.
    – Mr_G
    Feb 7 at 10:41

Not the answer you're looking for? Browse other questions tagged or ask your own question.