how to add custom left sidebar in each pages
-
I have create custom left side bar this side add in home page,about us page & product page ect,i am using <?php get_header(‘header-page’); ?>
header part display but data not display.
header.php<?php /* Template Name: header-page */ ?> <!DOCTYPE html> <html <?php language_attributes(); ?>> <head> <link rel="stylesheet" type="text/css" href="<?php echo get_stylesheet_uri(); ?>" /> </head> <body> <!--start of nav tag--> <div id="header"> <div id="header1"> <div id="logo"> <img src="<?php echo the_field('header_logo'); ?>" alt="" width="184" height="95"/> </div> <div id="searchbox"> <div class="searchbg"><?php echo the_field('header_quick_contact'); ?> <div style="float:left"><input type="text" class="inputBox" /></div> <div style="float:right"><button type="button" class="searchbutton"></button></div> </div> </div> </div> <div style="clear:both"></div> <div id="menubar"> <?php wp_nav_menu( array( 'theme_location' => 'main-menu' ) ); ?> </div> <div style="clear:both"></div> <div id="greybg"> </div> </div>
products.php
<?php /* Template Name: products-page */ ?> <?php get_header('header-page'); ?> <div id="wrapper"> <img src="<?php bloginfo('stylesheet_directory'); ?>/images/lampbanner.jpg" width="1024" height="200" /> <div id="sectionproducts"> <div id="leftmenu"> <?php the_field('test'); ?> </div> <div style="clear:both"></div> </div> </div> <?php get_footer(); ?>
[Moderator Note: Please post code or markup between backticks or use the code button. Or better still – use a pastebin. Your posted code may now have been permanently damaged by the forum’s parser.]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘how to add custom left sidebar in each pages’ is closed to new replies.