Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am working on a user dashboard for my site using wp user front end and Mingle. I decided the best way to integrate this is by creating a custom sidebar and using that in a new template, which I did.

However.. None of my content is showing up and it's driving me nuts.

sidebar-dashboard.php


<?php
/*** The Sidebar containing the dashboard links **/
?>

<?php
if ( is_active_sidebar( 'dashboard-sidebar' ) ) : ?>
<div id="secondary" class="widget-area" role="complementary">           
<ul class="xoxo">               
<?php dynamic_sidebar( 'dashboard-sidebar' ); ?>            
</ul>   
</div>
<?php endif; ?>

dashboard.php


<?php
/*
Template Name: User Dashboard
*/
?>


<?php get_header(); ?>

            <div id="content" role="main">



            </div><!-- #content -->



<?php get_sidebar( 'dashboard' );?>
<?php get_footer(); ?>

functions.php...


    // Area 7, the sidebar for the dashboard panel
register_sidebar( array(
    'name' => __( 'Dashboard Sidebar', 'twentyten' ),
    'id' => 'dashboard-sidebar',
    'description' => __( 'The dashboard sidebar', 'twentyten' ),
    'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
    'after_widget' => '</li>',
    'before_title' => '<h3 class="widget-title">',
    'after_title' => '</h3>',
) );

So then I go and make all the dashboard pages have the "User Dashboard" template expecting that the sidebar would be on the left and the content would be on the right, but that's not the case. The sidebar shows up but no content whatsoever.

What am I doing wrong?


Edit: Also, if someone knows any PHP hooks for Mingle that I can use in template pages that would be great, I can't find any documentation on it and they haven't answered me. It's not really a fix to the core issue, but it's a cheap way around it. For WP User Frontend I can just use the do_shortcode function, but Mingle doesn't even seem to have any shortcodes.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

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 posts matched your criteria.'); ?></p>
<?php endif; ?>


<?php get_sidebar( 'dashboard' );?>
<?php get_footer(); ?>
share|improve this answer
    
lol. So........ thanks. facepalm –  Lynne Jan 18 '11 at 22:19
    
:-) glad to help!! –  Bainternet Jan 18 '11 at 22:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.