Remove sticky from post
-
How do I remove the sticky from a post in the Intergalactic theme? It’s driving me crazy.
-
Hi niustephanie
You can do that by creating child theme
1. After creating child theme successfully then go to main theme’s folder you will find index.php file.
2. Now copy and paste that file from main theme’s folder to child theme’s folder.
3. Now copy and paste below code in index.php file as a whole.<?php /** * The main template file. * * This is the most generic template file in a WordPress theme * and one of the two required files for a theme (the other being style.css). * It is used to display a page when nothing more specific matches a query. * E.g., it puts together the home page when no home.php file exists. * Learn more: http://codex.ww.wp.xz.cn/Template_Hierarchy * * @package Intergalactic */ get_header(); ?> <div id="primary" class="content-area"> <main id="main" class="site-main" role="main"> <?php if ( have_posts() ) : ?> <?php /* Start the Loop */ $stickies = get_option('sticky_posts'); if( $stickies ) { $args = array( 'ignore_sticky_posts' => 1, 'post__not_in' => $stickies ); global $wp_query; query_posts( array_merge($wp_query->query, $args) ); }?> <?php while ( have_posts() ) : the_post(); ?> <?php /* Include the Post-Format-specific template for the content. * If you want to override this in a child theme, then include a file * called content-___.php (where ___ is the Post Format name) and that will be used instead. */ get_template_part( 'content', 'home' ); ?> <?php endwhile; ?> <?php intergalactic_paging_nav(); ?> <?php else : ?> <?php get_template_part( 'content', 'none' ); ?> <?php endif; ?> </main><!-- #main --> </div><!-- #primary --> <?php get_footer(); ?>4. Now Go to Admin Panel and activate child theme.
Note: Please customize files of child theme, so your changes will not overwrite on theme update.Best Regards!!!
niustephanie – could you clarify a little bit what you’re trying to do exactly?
Are you just trying to un-sticky a post that you had once made sticky? If so, click the Edit link next to the visibility setting in the post editor:
Next, un-check the Sticky box and click Update to save changes.
Let me know if this wasn’t what you were after and we’ll take it from there.
These forums are for folks running the WordPress software on their own hosting, not on WordPress.com. If you need further help with your theme on WordPress.com, feel free to post in the forums themes forum here:
https://en.forums.wordpress.com/forum/themesHere are some tips on getting help in the WordPress.com forums: http://en.support.wordpress.com/getting-help-in-the-forums/
You can also access the live chat support option when available here:
Thank you for the replies! I didn’t realize the forum is for self-hosted sites- I’m using WordPress.com, so my Edit Post options look a bit different. I was just wanting to un-sticky a post that I had stickied earlier (don’t know how, which is why I don’t know how to undo it).
I appreciate the help though!
You can see a screenshot here of the sticky option in the new WordPress.com editor:
https://en.support.wordpress.com/post-visibility/#sticky-posts
Click the little arrow to open the panel if you don’t see it.
Good luck!
Perfect, this is exactly what I needed! Thank you so much!!
My pleasure!
The topic ‘Remove sticky from post’ is closed to new replies.

