View Single Post
  #1  
Old 11-04-2012, 08:46 PM
ckarasiewicz ckarasiewicz is offline
Registered User
Pro Plus Member
 
Join Date: Jun 2011
Posts: 75
Default Disappearing sidebar

I have a very odd thing happening on a non-Studiopress Wordpress site.

What I'm looking to do is to add a slider showcasing a specific pinboard on Pinterest. I'm trying to use Slidedeck 2.

Currently, I have 2 sidebars - an email sign-up box and a social media contacts section.

What is happening is when I add Slidedeck 2 through the Widgets panel in the Wordpress dashboard, it causes all of my sidebars to disappear.

What I've done:

I created a slidedeck to show a pinboard from Pinterest on plumbuilders.com/blog.

I have added a new sidebar to my functions.php code. This shows up in Wordpress. I have also added the necessary sidebar-pinterest.php file and have it called it into the page template, blog.php.

For some reason, when I add the slidedeck widget to this sidebar, it causes all of my other sidebars to disappear - the social sidebar and the email sign-up sidebar.

I have also tried adding a text widget and adding the shortcode from slidedeck 2. Adding just a title and body text shows the text I displayed. Adding the shortcode displays nothing.

I'm wondering what the best way to fix this is. I have already reached out to Slidedeck and have not gotten a response. I'm hoping someone here can give me some direction on how to fix this - or maybe offer a better alternative to display a slideshow of a pinboard from Pinterest in my sidebar.

Sidebar-pinterest.php code

PHP Code:
<div id="sidebar">
<ul>
<?php
if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('pinterest-sidebar') ) :
endif; 
?>
</ul>
</div>
Pinterest sidebar code within functions.php

PHP Code:
// Pinterest Sidebar
if ( function_exists('register_sidebar') ) {
register_sidebar(array(
'name' => 'Pinterest Sidebar',
'id' => 'pinterest-sidebar',
'description' => 'Appears as the pinterest sidebar on the custom blog page',
'before_widget' => '<li id="%1$s" class="widget %2$s">',
'after_widget' => '</li>',
'before_title' => '<div class="custom-sidebar"><h2 class="post-title">',
'after_title' => '</h2></div>',
));

Blog.php code

PHP Code:
<?php /*Template Name:Blog*/ ?>

<?php get_header(); ?>
<!--HEADER END HERE-->

<!--CONTENT STARTS HERE-->
<div class="modern-content-blog">
<div class="left">
<h2> <?php the_title(); ?> </h2>

<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args = array( 'post_type' => 'post''posts_per_page' => 10'cat' => '-12, -11, -10, -9, -8, -5, -3' 'paged' => $paged );
$wp_query = new WP_Query($args);


while ( 
$wp_query->have_posts() ) : the_post(); ?>

<h2 class="post-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
Posted by: <?php the_author() ?> on <?php the_time('F jS, Y'); ?>
<?php the_excerpt
(); ?>
<a href="<?php the_permalink(); ?>" title="Read the rest of <?php the_title(); ?>" class="button">Read the rest of this entry »</a>

<div class="hr"></div>
<?php endwhile; // Reset Post Data
wp_reset_postdata();
?>

<div class="navigation">
<div class="next-posts button"><a><?php next_posts_link'<< Older posts >>' ); ?></a></div>
<div class="prev-posts button"><?php previous_posts_link'Newer posts >>' ); ?></div>
</div>

</div>

<div class="right">

<ul>

<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('social-sidebar') || !dynamic_sidebar('blog-sidebar') || !dynamic_sidebar('pinterest-sidebar') ) { ?>

<?php ?>

</ul>

</div>
</div>

<!--FOOTER START HERE-->
<?php get_footer(); ?>

post-title">',
'after_title' => '</h2></div>',
));
}