SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Guru
    Join Date
    Oct 2010
    Location
    Portland, Or
    Posts
    732
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    dynamic sidebar not showing up in actual page.

    Hello I have this function in the function.php

    PHP Code:
    register_sidebar (array(
        
    'name' => 'sidebar01',
        
    'before_widget' => '<li id ="%1$s" class="%2$s"> ' ,
        
    'after_widget' => '</li > ' ,
        
    'before_title' => '<h3 class="widgettitle">',
        
    'after_title' => '</h3>'
        
    )); 
    and this in the related sidebar.php

    HTML Code:
    		<div id="nav01">
    			<ul>
    			<?php if(!function_exists('dynamic-sidebar')|| !dynamic_sidebar('sidebar01')){ ?>
    			<?php } ?>
    			</ul>
    		</div><!--end nav01-->
    in the wp admin area I now have the option my dynamic sidebar showing up, under widgets. I can the various widgets to it.
    Only itch so far it is not displaying in the actual page.

    i see the colored div i have for it. but not the side bar.
    Could someone point me to what I am doing wrong?
    Thx
    D

  2. #2
    SitePoint Zealot
    Join Date
    Jun 2011
    Location
    Kolding, Denmark
    Posts
    108
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Do you have
    PHP Code:
    <?php get_sidebar(); ?>
    in the template file where sidebar should be shown?

  3. #3
    SitePoint Guru
    Join Date
    Oct 2010
    Location
    Portland, Or
    Posts
    732
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Yes.
    But very reasonable question...if only :-) I would gladly have traded temp embarrassment for a sidebar or two.
    and actually since i wrote this post I use the same code to add an extra side bar.


    the color div and text I used as marker/placeholder "where is the sidebar" show up.
    Also been looking at wp own support page. so far no luck. wpSidebarIssues01.jpg

    yeah I know crappy color scheme but not yet at the design stage.
    thx
    D

  4. #4
    SitePoint Zealot
    Join Date
    Jun 2011
    Location
    Kolding, Denmark
    Posts
    108
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Didn't notice this at first, but
    PHP Code:
    !function_exists('dynamic-sidebar'
    should be
    PHP Code:
    !function_exists('dynamic_sidebar'

  5. #5
    SitePoint Guru
    Join Date
    Oct 2010
    Location
    Portland, Or
    Posts
    732
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Ronalds thank you! You are so dead on had not seen that at all.
    enacted the change and can now see the side bars.
    Thank you!


Bookmarks

Posting Permissions

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