• Resolved lazymoon

    (@lazymoon)


    I’m currently working on my own WordPress template. After rewriting the header, index, etc and tested my site I recieved a couple of very wierd errors.

    Some tags would simple not produce values such as:

    echo ‘<title>’.bloginfo(‘name’).'</title>’;

    Would return

    <title></title>

    However, some tags would place the value, but outside of the area where the tag is placed, for example:

    echo ‘<div class=”post-date”><span class=”month”>’.the_time(‘M’).'</span><span class=”day”>’.the_time(‘j’).'</span></div>’;

    Would produce:

    Apr29
    <div class=”post-date”><span class=”month”></span><span class=”day”></span></div>

    As you can see, the output of ‘Apr29’ should have been within the SPAN tags, but it was output elsewhere. This is happening with all of my WordPress template tags.

    Any idea why this is happening?

Viewing 1 replies (of 1 total)
  • Thread Starter lazymoon

    (@lazymoon)

    Solved myself. If anyone else is getting this problem with the echo line, try replacing the decimals with commas:

    echo ‘<title>’.bloginfo(‘name’).'</title>’;
    echo ‘<title>’,bloginfo(‘name’),'</title>’;

    Seems to work fine with commas.

Viewing 1 replies (of 1 total)
  • The topic ‘WordPress inserting tag values in wrong area’ is closed to new replies.