0

I want to add this line <img src="<?php field('text') ?>" alt="" /> inside

wp_nav_menu( array $args = array( 'link_before' => 'ADD_CODE_HERE' ));

but it doesn't work because link_before is for text. Is there any way to add this code?

1 Answers1

0

Try like this:

wp_nav_menu( array( 'link_before' => '<img src="'. field("text") .'" alt="" />' ));

If your field("text") has proper value then the image will show up.