bloginfo(‘template_directory’) not displaying in correct place
-
Hey all,
I am retrieving and displaying some meta information from a page, but it is behaving a little strangely, just wondering if any body can help?
I am using this code –
$microsite_title = get_post_meta($msid, 'microsites_title', true); $microsite_id = get_post_meta($msid, 'microsites_pid', true); $microsite_logo = get_post_meta($msid, 'microsites_logo', true); if($microsite_logo != ''){ $microsite_logo = bloginfo('template_directory') . '/assets/gfx/branding/' . $microsite_logo; } echo $microsite_title . '<br />'; echo $microsite_id . '<br />'; echo $microsite_logo;
And I’m expecting someghing like this –
Title 1
1234
https://www.siteurl.co.uk/wp-content/themes/themename/microsite_logo.pngBut it is displaying like this –
https://www.siteurl.co.uk/wp-content/themes/themenameTitle 1
1234
/microsite_logo.pngThis appears that
bloginfo('template_directory')
is displaying at the beginning for some reason, but I don’t know why.Thanks.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘bloginfo(‘template_directory’) not displaying in correct place’ is closed to new replies.