WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] "frontal" post with "special" date (9 posts)

  1. Elan42.com
    Member
    Posted 6 years ago #

    Hi...

    I'll explain this with an example.
    I'd like to make a category, music-queen, in wich I describe the musical group.
    In that category, I also want to post the lyrics of the musical group.

    Now Think about it... the group description will always be the last post cause it's the first I have done, but I'd like to have it always as the first post.

    Is there a hack or some kind of plugin to make this possible?

  2. Kafkaesqui

    Posted 6 years ago #

    See this plugin:

    http://www.transycan.net/blogtest/2007/10/30/custom-query-string-reloaded-for-wordpress-23-with-tag-support/

    With it you can set a specific category query to display in 'reverse' order (ASCending instead of DESCending). It also does a lot more...

    Another option is to use one of the "sticky" post plugins:

    http://wordpress.org/extend/plugins/wp-sticky/
    http://codex.wordpress.org/Plugins/Posts_Miscellaneous
    (several listed at last link)

  3. Elan42.com
    Member
    Posted 6 years ago #

    Thank you... but ALL that plugins allow me to put a "sticky post" before every one else...

    I need to put it before the post of the same category he belongs to, only if that category is being watched.

    Is there any solution?

  4. Kafkaesqui

    Posted 6 years ago #

    Then look again at:

    http://www.transycan.net/blogtest/2007/10/30/custom-query-string-reloaded-for-wordpress-23-with-tag-support/

    It lets you set a different sort order (ASCending instead of DESCending, so oldest post is listed first) for category queries in general, or for just one (or more) specific categories.

  5. meatberg
    Member
    Posted 6 years ago #

    you can do a hack like this in query.php, around line 931, just above

    // Order by
    if (empty($q['orderby'])) :

    // Reverse Order Hack

    if ('17' == ($q['cat'])) {
    $q['order']='ASC';
    }

    if ('7' == ($q['cat'])) {
    $q['order']='ASC';
    }

    if ('4' == ($q['cat'])) {
    $q['order']='ASC';
    }

    if ('21' == ($q['cat'])) {
    $q['order']='ASC';
    }

    if ('5' == ($q['cat'])) {
    $q['order']='ASC';
    }

    if ('2' == ($q['cat'])) {
    $q['order']='ASC';
    }

    if ('37' == ($q['cat'])) {
    $q['order']='ASC';
    }

  6. Elan42.com
    Member
    Posted 6 years ago #

    Hi... thanks to all for the suggestions, but:

    @Kafkaesqui that plugin is not working for me, probably cause I'm using the http://fortes.com/projects/wordpress/top-level-cats/
    ?

    @meatberg unfortunately I can't get crazy with category ids... However I will ponderate that solution if I don't find any else.

  7. Kafkaesqui

    Posted 6 years ago #

    Then there's always the brute force method. I can suggest the approach I describe here:

    http://wordpress.org/support/topic/146437#post-658495

    Revamping the code for your needs:

    <?php
    /* Short and sweet */
    define('WP_USE_THEMES', true);
    if( strpos($_SERVER['REQUEST_URI'], '/music-queen/') ) {
    	$_GET['order'] = 'ASC';
    }
    require('./wp-blog-header.php');
    ?>
  8. AndreSC
    Member
    Posted 6 years ago #

    aStickyPostOrderER will allow you to easily configure 'sticky posts per category, tag or over-all

    (and you don't need to mess with code :)

  9. Elan42.com
    Member
    Posted 6 years ago #

    Thank you to Andre for the support and the plugin.

    I still have to get the final trick done but I'm sure that this is the definitive solution.

    I set up the plugin, Andre mess with the code ;)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.