Results 1 to 5 of 5

Thread: Custom blog sidebar

  1. #1
    Thread Starter
    Amateur pnmcosta's Avatar
    Join Date
    Jan 2013
    Location
    Portugal
    Posts
    16
    Thanks
    0
    Thanked 4 Times in 2 Posts

    Cool Custom blog sidebar

    Quick guide if you want to have sidebar different to the default one in your blog pages.

    1) Copy index.php and single.php onto your child theme.
    2) On both pages, replace:
    PHP Code:
    <?php get_sidebarapp_template_base() ); ?>
    with
    PHP Code:
    <?php dynamic_sidebar'blog' ); ?>
    3) Register a dynamic sidebar on your child theme's functions.php, like so:
    PHP Code:
    register_sidebar( array(
            
    'id' => 'blog',
            
    'name' => 'Blog Sidebar',
            
    'description' => 'The sidebar on the blog index and single pages',
            
    'before_widget' => '<aside id="%1$s" class="widget %2$s">',
            
    'after_widget' => "</aside>",
            
    'before_title' => '<div class="section-head"><h3>',
            
    'after_title' => '</h3></div>',
    ) ); 
    4) Create sidebar-blog.php on your child theme with the following code:
    PHP Code:
    <?php dynamic_sidebar'blog' ); ?>
    You now have a sidebar that is editable via the wp-admin widgets section that is used on the blog's home page and single article page.

    Hope this helps someone else

  2. The Following 3 Users Say Thank You to pnmcosta For This Useful Post:

    crixx (April 7th, 2013), gonesmith (February 12th, 2013), thedesignguys (February 10th, 2013)

  3. #2
    Veteran jamesweb's Avatar
    Join Date
    Jul 2010
    Location
    Ireland
    Posts
    459
    Thanks
    84
    Thanked 9 Times in 9 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  4. #3
    Expired Customer gonesmith's Avatar
    Join Date
    Jun 2012
    Posts
    764
    Thanks
    50
    Thanked 202 Times in 137 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  5. #4
    Veteran jamesweb's Avatar
    Join Date
    Jul 2010
    Location
    Ireland
    Posts
    459
    Thanks
    84
    Thanked 9 Times in 9 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  6. #5
    Thread Starter
    Amateur pnmcosta's Avatar
    Join Date
    Jan 2013
    Location
    Portugal
    Posts
    16
    Thanks
    0
    Thanked 4 Times in 2 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  7. The Following User Says Thank You to pnmcosta For This Useful Post:

    jamesweb (February 26th, 2013)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Modify blog sidebar
    By olenka_br in forum JobRoller General Discussion
    Replies: 3
    Last Post: February 9th, 2012, 09:31 AM
  2. Blog Sidebar
    By gershon in forum Report ClassiPress Bugs
    Replies: 2
    Last Post: November 22nd, 2011, 11:46 AM
  3. [MOD NEEDED] Main sidebar in blog page
    By pinocchio in forum ClassiPress General Discussion
    Replies: 3
    Last Post: December 14th, 2010, 05:44 PM
  4. Blog Catgories on Sidebar
    By essej88 in forum Report ClassiPress Bugs
    Replies: 2
    Last Post: November 9th, 2010, 11:49 PM
  5. Excluding Blog Posts in Top Ads Sidebar
    By mrg19 in forum ClassiPress General Discussion
    Replies: 4
    Last Post: June 5th, 2010, 11:42 AM