ThemeShaper Forums » Power Blog

[closed]

remove sticky from home page ?

(8 posts)
  1. thibotus01
    Member

    Hi,

    How could I remove the sticky posts which are always on top on the home page? (with a border) I'd like to display them like regular post because i'm using them for another place in a widget area.

    thanks

    Posted 3 years ago #
  2. pelayo.mao
    Member

    For thematic? Could we see the page you are talking about?

    Posted 3 years ago #
  3. thibotus01
    Member

    It's the home page, where the news are. All the sticky posts are always on top.

    Posted 3 years ago #
  4. Hi,

    try this code in your child theme's functions.php:

    function remove_sticky_posts() {
    	global $paged;
    	if ($paged == '1') {
    		query_posts('caller_get_posts=1');
    	}
    }
    add_action( 'thematic_above_indexloop', 'remove_sticky_posts' );

    This will skip the sticky post. You still need to change the CSS to prevent that the post gets the frame while displayed in the regular timeline.

    Chris

    Posted 3 years ago #
  5. thibotus01
    Member

    It worked partially :s. I still have one sticky post showed (but below a normal post). Don't know why?

    Posted 3 years ago #
  6. That's because the code only skips the first post, which is sticky. It doesn't filter the sticky posts from the loop.

    Or .. should the sticky posts be removed completely from the loop?

    Chris

    Posted 3 years ago #
  7. thibotus01
    Member

    Yes I don't want any sticky posts on the top on the home page index.php, but I do want to display them as regular posts.

    Posted 3 years ago #
  8. Hi,

    then you need change the CSS for the sticky post.

    Chris

    Posted 3 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.