How to display featured posts as the first in a standard loop?
I noticed the posts have class <li class = "jsFeatured">
. I would like to always show up at the top of the list.
My code:
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<li <?php post_class(); ?>>
<?php the_title(); ?>
</li>
<?php endwhile; else : ?>
<li><?php _e( 'No posts' ); ?></li>
<?php endif; ?>
Thanks.
]]>The date displayed in the widget does not appear to be properly scoped. It displays the date of the first post for all subsequent posts listed. The fix is to add the format and post id to the get_the_date() https://codex.www.ads-software.com/Function_Reference/get_the_date in the widget function of this plugin, e.g.:
<?php echo get_the_date( 'm/d/Y', $fp->ID );?>
Would love to be able to “sort” by the Featured column in the Posts list. As it is now if I’ve got a lot of posts and want to de-select some featured posts, it’s a bit tedious to scroll through all my pages to find them.
https://www.ads-software.com/plugins/featured-posts-and-custom-posts/
]]>I just tried to install the latest version of this plugin, but there’s a fatal error on activation and it fails.
“Plugin could not be activated because it triggered a fatal error.”
“Parse error: syntax error, unexpected $end in wp-content\plugins\featured-posts-and-custom-posts\js_featured_posts_and_custom_posts.php on line 152”
https://www.ads-software.com/extend/plugins/featured-posts-and-custom-posts/
]]>Hello,
I had an simple issue: on custom post types, the column Featured displayed two stars of featured post. I dont know why.
I had a simple solution for that: .featured_js_posts A:last-child { background:#F00; display:none; }
But I think it’s not the best solution. I don even know why the problem occurs.
PS: The custom post type was created with Magic Fields…
Do you have a better and definitive solution?
Thanks, great work!
Best,
https://www.ads-software.com/extend/plugins/featured-posts-and-custom-posts/
]]>In your theme and in the template you need the featured functionality uses a custom query like this query_posts(“post_type=professionals&posts_per_page=-1&meta_key=_jsFeaturedPost&meta_value=yes”); to grad all of the featured posts.
This is a rather general description of what needs to be added to the theme and the template. Where specifically does this need to be placed or doesn’t it matter?
Thanks
mmconsulting
https://www.ads-software.com/extend/plugins/featured-posts-and-custom-posts/
]]>