Forums

[resolved] php wont show up .... (2 posts)

  1. kasupure
    Member
    Posted 3 years ago #

    Hello! i got little problem. When i try add this code inside my template:
    <?php
    if (is_single()) {
    echo "<?php the_category(); ?>";
    } else {
    echo 'Something';
    }
    ?>
    it wont show up, BUT it will show up in code section (mouse right click and that way) and the color of the code is pink. Is the code wrong which i have pasted to begin of the post or what might be the problem? Help if needed :( !

  2. kasupure
    Member
    Posted 3 years ago #

    Ups! Nvm i found the "bug" myself i accidently added <?php stuff in front of code ^^! so if anyone is getting same problem just remove those php marks like this:

    <?php
    if (is_single()) {
    the_category();
    } else {
    echo 'Something';
    }
    ?>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags