WordPress.org

Ready to get started?Download WordPress

Forums

Nano Plugin Manager
[resolved] "Sort Posts by Title" brake sort options under admin->pos (3 posts)

  1. clinton4
    Member
    Posted 2 years ago #

    Hi,

    When i use the "Sort Posts by Title" plugin, i cannot use the sort options under admin->posts.

    http://wordpress.org/extend/plugins/nano-plugin-manager/

  2. gab.ro
    Member
    Plugin Author

    Posted 2 years ago #

    Hello

    You want your nano to behave differently when you're in the admin section than when you're viewing the site. What you need is the conditional tag is_admin:

    if(!is_admin()){
      return 'post_title';
    }
    else{
      return $orderby;
    }

    Notice the $orderby argument. In order to be able to use it, put it in the Hook Arguments field. That is the default value, so the nano does not modify it when you're in the admin section.

    Regards,
    Gab

  3. gab.ro
    Member
    Plugin Author

    Posted 2 years ago #

    In the future, you can also visit the plugin website for similar questions :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic