• Resolved do77

    (@do77)


    Hey,
    I am using the revolution lifestyle theme and I also want to use the AstickyPostorder plugin. But when I activate the plugin, the sections on the homepage don’t show the featured posts anymore.

    Does anyone has an idea why that could be?

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter do77

    (@do77)

    Ok, I figured it out. I had to define the featured posts by ID to make the plugin work with the theme.

    Can you explain? I don’t understand what you mean by ‘define the featured posts by ID’ ? I am having this same issue with this plugin and the Streamlined theme. Any insight or more detailed help to get this plugin to work with this theme I’d be most grateful!

    Instead of having this in your header.php :
    <?php $my_query = new WP_Query('category_name=featured&showposts=10');?>

    you must build a query with the ID instead of category_name and it should look like this:

    <?php
    $args = array(
          	'showposts' => 10,
          	'post__in'  => array(1,3,66,321)
          );
    $my_query = new WP_Query($args); ?>

    where 1,3,66,321 are posts ID.

    Can someone please help with what I need to adjust the following code to make the featured categories show the posts on the home page. I’m not sure what need to change.

    This is part of the code that is on my home.php page using the studiopress lifestyle theme:

    <div class="hpfeatured">
    			<h3><?php echo cat_id_to_name(get_theme_mod('featured_top_right')); ?></h3>
    
    				<?php $recent = new WP_Query("cat=".get_theme_mod('featured_top_right')."&showposts=".get_theme_mod('featured_top_right_num')); while($recent->have_posts()) : $recent->the_post();?>
    				<?php if( get_post_meta($post->ID, "thumb", true) ): ?>
    				<a href="<?php the_permalink() ?>" rel="bookmark"><img class="thumb" src="<?php bloginfo('template_directory'); ?>/tools/timthumb.php?src=<?php echo get_post_meta($post->ID, "thumb", $single = true); ?>&h=<?php echo get_theme_mod('featured_top_right_thumb_height'); ?>&w=<?php echo get_theme_mod('featured_top_right_thumb_width'); ?>&zc=1" alt="<?php the_title(); ?>" /></a>
    				<?php else: ?>
    				<?php endif; ?>		
    
    				<strong><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></strong>
    				<?php the_content_limit(80, ""); ?>
    
    				<hr/>
    
    				<?php endwhile; ?>
    				<?php $cat = get_category(get_theme_mod('featured_top_right')); ?>
    				<strong><a href="<?php echo get_category_link(get_theme_mod('featured_top_right')); ?>" rel="bookmark"><?php echo __("Read More Posts From ", 'studiopress')." ".$cat->name; ?></a></strong>
    
    			</div>
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘AstickyPostOrder featured categories = failure’ is closed to new replies.