WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: AStickyPostOrderER] 2.9.1 compatibility (Trash)... (6 posts)

  1. saharusa
    Member
    Posted 4 years ago #

    Open:
    croer-functions.php

    Line 138:
    Add to the end of the query:
    AND post_status != 'trash'

    Line 145:
    Add to the end of the query:
    AND post_status != 'trash'

    http://wordpress.org/extend/plugins/astickypostorderer/

  2. spedro
    Member
    Posted 4 years ago #

    I don't solve the problem. The admin block when I enter in menu configuration plugin.

  3. AndreSC
    Member
    Posted 4 years ago #

    Hi

    Please tell me more about the problem

    Thanks

  4. jumust
    Member
    Posted 3 years ago #

    saharusa could you please be more specific? where should I add those lines?...my numbers are probably different. Here is part of the code

    if ( $croer_cat != 0) {
                    //  Cat
                    $query= "SELECT * ".
                    "FROM $wpdb->posts JOIN ($wpdb->term_relationships, $wpdb->term_taxonomy) ".
                    "ON ($wpdb->posts.ID = $wpdb->term_relationships.object_id AND $wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id) ".
                    "WHERE  $wpdb->term_taxonomy.term_id IN $c_cat_and_subcats AND post_type = 'post'";
                    //echo "br>".$query;
            } else {
                    // not cat
                    $query= "SELECT * ".
                    "FROM $wpdb->posts JOIN ($wpdb->term_relationships, $wpdb->term_taxonomy) ".
                    "ON ($wpdb->posts.ID = $wpdb->term_relationships.object_id AND $wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id) ".
                    "WHERE  post_type = 'post'";
            }
    
             $query.="ORDER BY ID DESC ;";
            // echo "<br>Q:".$query;
             $result = mysql_query($query);
    
             ?>
        <tr>

    Thanks

  5. saharusa
    Member
    Posted 3 years ago #

    Directly after

    WHERE post_type = 'post'

    So it will looks like this:

    if ( $croer_cat != 0) {
                    //  Cat
                    $query= "SELECT * ".
                    "FROM $wpdb->posts JOIN ($wpdb->term_relationships, $wpdb->term_taxonomy) ".
                    "ON ($wpdb->posts.ID = $wpdb->term_relationships.object_id AND $wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id) ".
                    "WHERE  $wpdb->term_taxonomy.term_id IN $c_cat_and_subcats AND post_type = 'post' AND post_status != 'trash'";
                    //echo "br>".$query;
            } else {
                    // not cat
                    $query= "SELECT * ".
                    "FROM $wpdb->posts JOIN ($wpdb->term_relationships, $wpdb->term_taxonomy) ".
                    "ON ($wpdb->posts.ID = $wpdb->term_relationships.object_id AND $wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id) ".
                    "WHERE  post_type = 'post' AND post_status != 'trash'";
            }
    
             $query.="ORDER BY ID DESC ;";
            // echo "<br>Q:".$query;
             $result = mysql_query($query);
    
             ?>
  6. lmllewellyn
    Member
    Posted 3 years ago #

    Thank you saharusa - this code was helpful. When I move posts from one category to another (which I must do frequently), the post shows in the new category sorting area, but it often remains in the old category sorting area as well. Have you found a solution to this problem? I have tried to contact the plugin developer, but have not heard anything.

Topic Closed

This topic has been closed to new replies.

About this Topic