Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.

Thread Tools Display Modes
Share |
Old 11-12-2013, 10:54 AM
drew68's Avatar
drew68 drew68 is offline
Contributing Member
Join Date: 07-19-06
Location: Orange County
Posts: 608
iTrader: 0 / 0%
Creating a new sidebar for new page template in Wordpress

i have a website but want to create a lander page using the same website theme files.

the website has a left sidebar and the content on the right.

i want to create the same thing for the lander but the left sidebar to have different information.

how do i create a new sidebar for that template i chose in the page? i created a new template called Lander template.
Reply With Quote



Old 11-21-2013, 08:13 AM
ayoups ayoups is offline
Junior Member
Join Date: 11-21-13
Posts: 2
iTrader: 0 / 0%
you can use plugins like "Custom sidebars"
but here is the code place it in functions.php

PHP Code:
// Registering new sidebar
genesis_register_sidebar( array(
'id' => 'lander-sidebar',
'name' => __'Lander Page Sidebar'),
'description' => __'This is the lander page sidebar section.' ),
) );

add_action'get_header''child_sidebar_for_page' );

child_sidebar_for_page() {
if ( 
is_page('lander') ) { // in place of lander put the page slug
remove_action'genesis_after_content''genesis_get_sidebar' );
add_action'genesis_after_content''get_sidebar_for_page' );

get_sidebar_for_page() {
'<div id="sidebar">';
dynamic_sidebar'lander-sidebar' );

Last edited by J. H. Rasmussen; 11-21-2013 at 04:21 PM. Reason: Added php-wrapper.
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
WordPress: <img> tag not working in a template page tomcool32 Coding Forum 1 06-12-2013 11:36 AM
wordpress function for sidebar MissTa Coding Forum 0 02-19-2013 04:10 AM
[FREE] UNIQUE WORDPRESS SALES PAGE TEMPLATE WITH KICK-ASS PLUGIN! (40 SPOTS LEFT) lucas131 Templates and Themes 0 01-09-2010 02:34 AM

V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory

All times are GMT -7. The time now is 02:42 PM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2018 VIX-WomensForum LLC