Results 1 to 18 of 18
  1. #1
    Newbie JeannieL's Avatar
    Join Date
    March 4th, 2010
    Location
    Alabama
    Posts
    12
    WP question regarding adding banner links
    I've been working on my blog today trying to figure out how to add banner links. I added one in the sidebar, but I don't want that to be cluttered. I'd like to add small banner links on the right side of the blog and have looked at the index.php, header.php, footer.php code but cannot figure out where to put the link code so that the banners will display on the right side of the blog. Any suggestions and advice would be appreciated!

  2. #2
    ABW Ambassador
    Join Date
    October 22nd, 2006
    Posts
    1,065
    sidebar.php is what builds your sidebar.

  3. #3
    Newbie
    Join Date
    February 21st, 2010
    Posts
    2
    If you add a text sidebar widget, you can drop your banner code in there, that would seem much easier than hacking about in the sidebar.php file

  4. #4
    Newbie JeannieL's Avatar
    Join Date
    March 4th, 2010
    Location
    Alabama
    Posts
    12
    Thanks, Sam!
    I did put one banner link in the sidebar column in the sidebar.php file and like the effect. However, since the sidebar contains links to posts and categories, I'd like to keep banners to a minimum and put the banners outside of the blog content, as in the background, to the right or to the left (the blog content is centered). Any ideas?

  5. #5
    Newbie JeannieL's Avatar
    Join Date
    March 4th, 2010
    Location
    Alabama
    Posts
    12
    Thanks Comoagua
    I'll look for a widget for the sidebar, too. I appreciate the advice.

  6. #6
    Visual Artist & ABW Ambassador lostdeviant's Avatar
    Join Date
    September 7th, 2007
    Location
    Cuautitlán, Edo. de México
    Posts
    1,725
    It sounds like you want to have an extra sidebar for banners. You could add another div to your template files and edit the CSS file (make the other sections narrower) so everything fits. It would be best to do that as an include file and paste your banner in that file (which contains the div)
    I'm assuming you know HTML, very basic PHP (able to read and add an include statement), and basic CSS.

  7. #7
    Visual Artist & ABW Ambassador lostdeviant's Avatar
    Join Date
    September 7th, 2007
    Location
    Cuautitlán, Edo. de México
    Posts
    1,725
    another option would be to look for a theme with two sidebars .
    or you could really learn wordpress API and add another sidebar that is widget enabled to do it all in wordpress's admin.

  8. #8
    Newbie
    Join Date
    March 5th, 2010
    Posts
    3
    sidebar
    sorry for error

  9. #9
    Newbie JeannieL's Avatar
    Join Date
    March 4th, 2010
    Location
    Alabama
    Posts
    12
    Thanks, lostdeviant
    I'll try editing the CSS and theme. I have a basic understanding of HTML and CSS and will have fun trying to figure this one out!

  10. #10
    Newbie
    Join Date
    March 5th, 2010
    Posts
    3
    I have just a question. Where can I put my signature on my account. I am new and I really doesn't find it.

  11. #11
    Newbie JeannieL's Avatar
    Join Date
    March 4th, 2010
    Location
    Alabama
    Posts
    12
    If you are wondering about adding a signature for the forum here, new members aren't allowed to do so until we have 250 posts to the forum. Hope that helps!

  12. #12
    Newbie
    Join Date
    March 5th, 2010
    Posts
    3
    Thank you very much.

  13. #13
    Newbie JeannieL's Avatar
    Join Date
    March 4th, 2010
    Location
    Alabama
    Posts
    12
    bleh
    I've tried all sorts of stuff to no good effect: tried adding a sidebar to the theme template with a sidebar2.php and edited the function.php to register 2 sidebars instead of 1. When I tried adding the get_sidebar2 function to the index page, I got a function error. Also, the second sidebar is not recognized in WP admin (at least not that I can find). I've read various tutorials today on how to do this, but now I'm just frustrated. Going to go browse and read some more!

  14. #14
    Visual Artist & ABW Ambassador lostdeviant's Avatar
    Join Date
    September 7th, 2007
    Location
    Cuautitlán, Edo. de México
    Posts
    1,725
    adding widgetized sidebars can be tricky. You might find it useful to look at the function.php code for a theme that already has two sidebars and compare it with your own code to make sure you don't have a mistake.

    If the code to register the second sidebar is bad, then it won't appear in appearance->widgets either. of course you don't have to make it a widgetized sidebar. :-)

  15. #15
    Newbie JeannieL's Avatar
    Join Date
    March 4th, 2010
    Location
    Alabama
    Posts
    12
    Hey thanks! I'll try that!

  16. #16
    Newbie JeannieL's Avatar
    Join Date
    March 4th, 2010
    Location
    Alabama
    Posts
    12
    OK, this is the code from the functions.php that is currently working:
    Code:
    <?php
    
    if ( function_exists('register_sidebar') )
        register_sidebar(array(
            'before_widget' => '<li id="%1$s" class="widget %2$s">',
            'after_widget' => '</li>',
            'before_title' => '<h2 class="widgettitle">',
            'after_title' => '</h2>',
        ));
     ?>
    And these are what I have tried that have not worked:
    Code:
    <?php
    
    
    if ( function_exists('register_sidebars') )
        register_sidebars(2)(array(
            'before_widget' => '<li id="%1$s" class="widget %2$s">',
            'after_widget' => '</li>',
            'before_title' => '<h2 class="widgettitle">',
            'after_title' => '</h2>',
        ));
     ?>
    and

    Code:
    <?php
    
    
    if ( function_exists('register_sidebars') )
        register_sidebars(2(array(
            'before_widget' => '<li id="%1$s" class="widget %2$s">',
            'after_widget' => '</li>',
            'before_title' => '<h2 class="widgettitle">',
            'after_title' => '</h2>',
        ));
     ?>
    What am I doing wrong? Ah well, I'm done for now and stepping away from the 'puter.

  17. #17
    Visual Artist & ABW Ambassador lostdeviant's Avatar
    Join Date
    September 7th, 2007
    Location
    Cuautitlán, Edo. de México
    Posts
    1,725
    what's the error?

  18. #18
    Newbie JeannieL's Avatar
    Join Date
    March 4th, 2010
    Location
    Alabama
    Posts
    12
    Ah, I didn't write the error code down. I decided to just keep the template to 1 sidebar and go with that. Sorry it took so long to reply; worked all weekend & 12 hour shifts are rough. Thanks again for your advice!

  19. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Adding 120x600 Skyscraper Banner Ads to Wordpress
    By tahjcarr7 in forum Midnight Cafe'
    Replies: 1
    Last Post: August 9th, 2008, 05:40 PM
  2. Adding RSS links
    By PetsWarehouse.com in forum Programming / Datafeeds / Tools
    Replies: 4
    Last Post: April 2nd, 2007, 04:02 PM
  3. Replies: 5
    Last Post: May 1st, 2006, 12:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •