Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Sticky posts integrated with normal jobs

  1. #1
    Thread Starter
    Junior Member
    Not a Verified Customer
    xiscomax's Avatar
    Join Date
    Oct 2009
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Sticky posts integrated with normal jobs

    How to stop being clingy and integrated in order of publication with the other inputs.

    Example:

    Post id.6
    Post id.5 sticky
    Post id.4 sticky
    Post id.3
    Post id.2 sticky
    Post id.1

    Code:
    $posts = query_posts($query_string . '&caller_get_posts=1&orderby='.$orderby.'&meta_key='.$key.'&order='.$order.'');
    &caller_get_posts=1
    this system in index.php is not working, any help?

  2. #2
    Thread Starter
    Junior Member
    Not a Verified Customer
    xiscomax's Avatar
    Join Date
    Oct 2009
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sticky posts integrated with normal jobs

    It does not work in the categories in the index and search results.

    If it works from page 2

    Any help?

  3. #3
    Thread Starter
    Junior Member
    Not a Verified Customer
    xiscomax's Avatar
    Join Date
    Oct 2009
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sticky posts integrated with normal jobs

    Template Hierarchy
    Determine what the template is displayed on main page and categories.

    I want to change the way entries are displayed on the homepage so that the sticky posts appear between the regular posts.

  4. #4
    groan's Avatar
    Join Date
    Nov 2009
    Location
    Ottawa, Canada
    Posts
    241
    Thanks
    0
    Thanked 3 Times in 2 Posts

    Re: Sticky posts integrated with normal jobs

    So only when viewed in the category, you want the stickies to go to the top, but not on the home page?
    You may need to incorporate an If statement
    Im not a coder but
    if is_home then dont use the sticky style.
    any coders out there that can code that up?

  5. #5
    Thread Starter
    Junior Member
    Not a Verified Customer
    xiscomax's Avatar
    Join Date
    Oct 2009
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sticky posts integrated with normal jobs

    Sticky not unfixed first on home page

    Eh changed the index.php but not function well.

    Upon entering my home page "latest posts" the sticky posts still appear in the first place.

    It only works when sorting by location, price, etc..

    Any solution?

    Can not be that difficult to see the non-sticky sticky posts ..?

    Code:
    					<?php $i = 1; 
    					
    					if(!empty($_GET['sort']))
    					{
    					$orderby=trim($_GET['sort']);
    					$order=trim($_GET['order']);
    					$key=trim($_GET['key']);
    					
    	
    					
    					// create the sort by injection
    					$posts = query_posts($query_string .'&caller_get_posts=1&orderby='.$orderby.'&meta_key='.$key.'&order='.$order.'');
    					}
    					
    					if (have_posts()) : ?>

  6. #6
    Thread Starter
    Junior Member
    Not a Verified Customer
    xiscomax's Avatar
    Join Date
    Oct 2009
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sticky posts integrated with normal jobs

    I think this piece of code prevents the sticky posts to work with the other entries.

    <? php $ i = 1;

    if (empty ($ _GET [ 'tipo']))
    {
    orderby $ = trim ($ _GET [ 'tipo']);
    $ order = trim ($ _GET [ 'orden']);
    $ clave = trim ($ _GET [ 'key']);

    Some help, I'm desperate with this issue.

    posts not sticky sticky posts on the front page

  7. #7
    Thread Starter
    Junior Member
    Not a Verified Customer
    xiscomax's Avatar
    Join Date
    Oct 2009
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sticky posts integrated with normal jobs

    achieved, thanks anyway

  8. #8
    Rookie
    Not a Verified Customer
    zulu42's Avatar
    Join Date
    Nov 2009
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sticky posts integrated with normal jobs

    may i know how you did it?

  9. #9
    Amateur
    Not a Verified Customer
    Pisos-Alquiler.com's Avatar
    Join Date
    Mar 2010
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sticky posts integrated with normal jobs

    Could you explain how you got it, please....someone else knows?

  10. #10
    Member damien's Avatar
    Join Date
    May 2009
    Location
    Melbourne, Australia
    Posts
    91
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sticky posts integrated with normal jobs

    what about

    use this code before the loop:
    Code:
    query_posts('caller_get_posts=1');
    gain, this parameter can be used with any of the other arguments for query_posts(). And this code doesn’t simply exclude posts marked sticky … it actually ignores the sticky status altogether. So if a person marks a post as sticky, by using this query_posts() parameter, you can have your loop act normally, not pulling that post to the top unless it is the latest post published (depending on the other query_posts parameters).
    http://www.nathanrice.net/blog/definiti ... dpress-27/

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)