Tag Info

New answers tagged

1

Put this in your functions.php: function my_title() { if (is_home()) echo 'News'; else { global $post; if ($post->post_parent) echo get_post($post->post_parent)->post_title; else echo $post->post_title; } } // function my_title and then use <?php my_title(); ?> anywhere you want. ...


0

Please note that get_template_directory_uri() is preferred over get_bloginfo('template_directory'). Please refer to this for more information: get_template_directory() vs bloginfo( 'template_directory' ) vs TEMPLATEPATH


3

You cannot use bloginfo() while your are outputting using echo because bloginfo it self also out puts string using echo. Below will work for you, you also have extra double quote which i have removed.... <?php $attch_id_1 = pn_get_attachment_id_from_url(get_post_meta($post->ID, 'img1', true)); $image_attributes_1 = ...


0

This should work $so97086_template_directory = get_bloginfo('template_directory'); And replace bloginfo('template_directory') with $so97086_template_directory;



Top 50 recent answers are included