chaseman Posted April 1, 2011 Share Posted April 1, 2011 I'm working on a Wordpress theme, and I'm assigning my own image to the navi list. So far assigning the image to the corresponding works if I type in the path manually, but the only problem I'm experiencing is assigning the correct path to the image with a 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. For those who don't know Wordpress, normally in Wordpress you'd do it like this: <a href="<?php bloginfo('url'); ?>" title="<?php bloginfo('description'); ?>"><img src="<?php bloginfo ('template_directory'); ?>/images/logo.png" alt="<?php bloginfo('description'); ?>" /></a> Link to comment https://forums.phpfreaks.com/topic/232463-how-to-implement-a-function-into-an-array-within-an-img-tag/ Share on other sites More sharing options...
chaseman Posted April 2, 2011 Author Share Posted April 2, 2011 Any suggestions? Link to comment https://forums.phpfreaks.com/topic/232463-how-to-implement-a-function-into-an-array-within-an-img-tag/#findComment-1195915 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.