1

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.

1 Answer 1

1

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(); ?>
1
  • :-) glad to help!!
    – Bainternet
    Commented Jan 18, 2011 at 22:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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