How to Implement a Function Into an Array Within an IMG Tag?
-
I’m working on a WordPress theme, and I’m assigning my own image to the navi list, which is simply an arrow sign right before menu item.
So far assigning the image to the corresponding menu item works if I type in the path manually, but the only problem I’m experiencing is assigning the correct path to the image with the WordPress specific function, here’s the code:
<div id='nav' class='link_var_4'> <div id='blog_navi'><?php wp_nav_menu(array( "link_before" => "<li><img src='" . bloginfo ('template_directory') . "/images/arrow.png' /></li>", "theme_location" => "primary-menu")); ?> </div> </div>How can I make the bloginfo function work inside the array in this above example? I’ve tried different variations and methods, none of them gave the expected results.
The topic ‘How to Implement a Function Into an Array Within an IMG Tag?’ is closed to new replies.