My version of wordpress is 5.2.3
I have a custom post type and I want to add it a sticky post. I tried many plugins and hack to figured out how to solved this problem (sticky custom post type isn't a native feature of wordpress) but I still don't know how to solved it.
Does anyone have a solution for me ?
-----EDIT------
I try this plugin https://wordpress.org/plugins/custom-post-type-sticky/. He put the same feature than the classic post of wordpress (a checkbox for put a sticky post) he works perfectly in back but nothing appear in front. (event with an additional code found here https://www.sktthemes.org/wordpress/add-sticky-posts-wordpress/) My code is a basic loop like :
<?php
$args_ressource = array(
'post_type' => 'ressource',
'order' => 'DESC',
'posts_per_page' => 4,
);
$ressource = new WP_Query( $args_ressource );
if ( $ressource->have_posts() ) { ?>
<ul>
<?php
while ( $ressource->have_posts() ) {
$ressource->the_post();
$imageArticle = get_field('hero_image');
?>
<li>
<a href="<?php the_permalink(''); ?>">
<?php the_title(); ?>
</a>
</li>
<?php } ?>
</ul>
<?php }
wp_reset_postdata();
?>
To be precise I need to show my sticky custom post type on the left of my page, and on the right the rest of the custom post but without this sticky post.
With the basic article a simple loop works because this is a basic feature of wordpress, but not with custom post type
Many thanks