WP Blog, sidebar banner shows only on homepage

Discussion in 'WordPress' started by pipes, May 8, 2008.

  1. #1
    Can you tell me if its normal for a banner that is placed in a sidebar using a text widget to only show on the homepage? it doesn't show when i visit a post page.

    Am i able to get the banner to show on post pages too in the sidebar? have i missed anything obvious?
     
    pipes, May 8, 2008 IP
  2. System0

    System0 Well-Known Member

    Messages:
    168
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    128
    #2
    the index template and single post template are different (usually but not always).

    Check the code for single.php and compare it to the index.php file - you'll probably find the sidebar isn't linked to in the single.php file.
     
    System0, May 8, 2008 IP
    pipes likes this.
  3. pipes

    pipes Prominent Member

    Messages:
    12,766
    Likes Received:
    958
    Best Answers:
    0
    Trophy Points:
    360
    #3
    Thanks System0, by right, on the average blog the sidebar would normally show whatever is in it on a page other than the homepage, is that correct?

    I created the theme for this blog myself so no doubt ive missed that.

    Added text: Ive just glanced at single.php and realise what ive done, last night i changed code in functions.php and in index.php to widgetize two sidebars and i forgot to alter the code in single.php
     
    pipes, May 8, 2008 IP
  4. System0

    System0 Well-Known Member

    Messages:
    168
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    128
    #4
    no probs pipes :)

    by default, if there is no single.php file then wordpress will look for the index.php file. However, most blogs use the single.php file (see this for more details).

    pm me the blog you are referring to if you want and I'll have a look at it :)
     
    System0, May 8, 2008 IP
  5. pipes

    pipes Prominent Member

    Messages:
    12,766
    Likes Received:
    958
    Best Answers:
    0
    Trophy Points:
    360
    #5
    Thanks System0, ive bookmarked that link and reading through it now, it looks very useful. :)
     
    pipes, May 8, 2008 IP
  6. bubaipal

    bubaipal Peon

    Messages:
    939
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    0
    #6
    See at the bottom of index php file. At the bottom is include/get footer.php.
    Above it is include/get sidebar.php. Copy the include/get sidebar.php code. Open page.php, psy.php, single.php what ever it is. See at the bottom is include footer.php code. Paste the include sidebar.php code just above it.

    Done. It works on most templates.:)
     
    bubaipal, May 11, 2008 IP
  7. pipes

    pipes Prominent Member

    Messages:
    12,766
    Likes Received:
    958
    Best Answers:
    0
    Trophy Points:
    360
    #7
    Thanks bubaipal, i managed to get it sorted, i had forgot to add some code into single.php and page.php that i had recently changed in index.php
     
    pipes, May 11, 2008 IP