• I am trying to get it to where I can call the Sidebar for only the index page. Is there a conditional tag I can use or is there a better way to do it. Thanks.

Viewing 7 replies - 1 through 7 (of 7 total)
  • <?php if( is_home()) { ?>

    Thread Starter benboles

    (@benboles)

    Where do I place that tag? And do I place the get sidebar tag inside of it?

    I’m having a hard time with this is well. Where do these conditional tags go? I get nothing but errors.

    I’ve been trying to paste this:
    <?php if(is_category() || is_archive()) {
    the_excerpt();
    } else {
    the_content();
    } ?>

    which I took from the codex, into my index.php page. I have been placing it where the <?php the_content(__(‘(more…)’)); ?> was. I get errors every time. What am I doing wrong?

    1. What are the errors you get?

    2. So we can get a better look at things, paste your template code here:

    https://pastebin.com/

    and reply back with the url to the paste-up.

    odd, I went to get the error again and now it’s working. Not sure what is different, but I’m gonna go with it for now. Thanks.

    I am also looking fro the same solution. Somebody help!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Conditional Tag for calling Sidebar’ is closed to new replies.