WordPress.org

Ready to get started?Download WordPress

Forums

Author Spotlight (Widget)
[resolved] Widget shows nothing (2 posts)

  1. Essbay
    Member
    Posted 1 year ago #

    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(); ?>

    http://wordpress.org/extend/plugins/author-profile/

  2. Debashish
    Member
    Plugin Author

    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.