Content not showing up when using custom template + sidebar

the problem is you never call the content!!! change your dashboard.php to something like this <?php /* Template Name: User Dashboard */ ?> <?php get_header(); ?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <div id=”content” role=”main”> <?php the_content(); ?> </div><!– #content –> <?php endwhile; else: ?> <p><?php _e(‘Sorry, no … Read more

activate custom sidebar widgets

You would register the sidebar in the functions.php file with something like this: <?php register_sidebar(array(‘name’=>’custom-content’, ‘before_widget’ => ‘<section>’, ‘after_widget’ => “</section>”, ‘before_title’ => ‘<h3>’, ‘after_title’ => “</h3>” )); ?> And Use it in your theme like this: <div class=”contents”> <?php if ( function_exists(dynamic_sidebar(1) ) ) : ?> <?php dynamic_sidebar(custom-content); ?> <?php endif; ?> </div>

Why is registering a sidebar for each page causing my sidebars to reset?

You need to wrap this in a function then add it to the widgets_init action. Also the register sidebar function does not have $arguments for sort_column or sort_order. I would also change the id to ‘sidebar-‘.$page->ID add_action( ‘widgets_init’, ‘prefix_register_sidebars’ ); function prefix_register_sidebars() { foreach($pages as $page){ register_sidebar( array( ‘name’=>$page->post_title, ‘id’=> ‘sidebar-‘.$page->ID, ‘before_widget’ => ‘<div id=”%1$s” … Read more

How to customize wordpress sidebar widget

register_sidebar(array( ‘name’ => ‘Post Sidebar’, ‘before_widget’ => ‘<div id=”%1$s” class=”widget %2$s”>’, ‘after_widget’ => ‘</div></div>’, ‘before_title’ => ‘<div class=”titlediv”>’, ‘after_title’ => ‘</div><div class=”widgetdiv”>’, )); You will have a wrapper div, then your title div and then your widgetdiv.

Registering Sidebar. Additional banners got displayed

You have three options: Register a dynamic sidebar for a specific page, and then create a page template that calls dynamic_sidebar() for the registered sidebar. Use an is_page( $id ) conditional wrapper in your page.php template Output Widget code conditionally, using is_page( $id ) Custom Page Template The first option would include your register_sidebar() call … Read more