• Resolved Essbay

    (@essbay)


    Hi,

    I have a page template where I display all posts where the category of the post matches the slug of the page title. For some reason the widget doesn’t show in the sidebar on these pages. The template file looks like this and I suspect that the page author is lost in some way when the part that starts with “Senaste inl?ggen:” of the template is run. Could you please help me understand how to solve this?

    Template code:

    <?php
    /*
    Template Name: Avdelning
    */
    ?>
    
    <?php get_header(); ?>	
    
    		<div class="ci-content-sidebar-left">
    			<div class="ci-content-positioner">
    				<div id="primary">
    					<div id="content" class="ci-regular-page" role="main">
    
    						<?php while ( have_posts() ) : the_post(); ?>
    							<div class="ci-entry">
    								<div class="ci-posttext-container">
    									<h3 class="ci-pageheader ci-cufon"><?php the_title(); ?></h3>
    			            <div class="ci-post-text">
    			              <?php the_content(''); ?>
    			            </div>?
    								</div>
    							</div>
    
    							<?php
    							 $options = get_option('ci_theme_options');
    							 if(isset($options['ci_allowcomments_pages'])) : ?>
    								<div class="ci-comments">
    									<?php comments_template( '', true ); ?>
    								</div>
    							<?php endif; ?>
    
    						<?php endwhile;?>
    <h2>Senaste inl?ggen:</h2>
    <?php
    $post_obj = $wp_query->get_queried_object();
    $post_ID = $post_obj->ID;
    $post_title = $post_obj->post_title;
    $post_slug = $post_obj->post_name;
    ?>
    	<?php query_posts('category_name='.$post_slug.'&post_status=publish,future');?>
    	<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    	<h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
    	<p><?php the_content(); ?>
    	<?php endwhile; else: endif; ?>
    </div>
    </strong>				</div>
    			</div>
    			<div class="ci-sidebar">
    				<?php
    					get_template_part('sidebar');
    				?>
    			</div>
    			<div class="ci-clear"></div>
    		</div>
    <?php get_footer(); ?>

    https://www.ads-software.com/extend/plugins/author-profile/

Viewing 1 replies (of 1 total)
  • Plugin Author Debashish

    (@debashish)

    The widget will not work on category pages. Its only supposed to work for pages or posts that have author(s).

Viewing 1 replies (of 1 total)
  • The topic ‘Widget shows nothing’ is closed to new replies.