Support » Plugin: Chronological Posts » Except on Homepage (Posts)

  • Resolved Luigi Jonne Garcia


    Hello! Thanks for this plugin!

    Just want to ask how can I deactivate the chronological order in my homepage posts. I just want this in my category pages. Thanks. 🙂

Viewing 1 replies (of 1 total)
  • Plugin Author Nick Halsey


    That’s probably best done with some custom code based on this plugin.

    It may sound scary, but it’s actually relatively easy to make a custom version of this plugin to do that. You’ll want to make a copy of the plugin code, rename the folder/files, and rename the plugin in the header (if you don’t rename it, your changes will be lost when (if) the plugin is updated). Then, change the line that contains:

    	if ( ! is_admin() && $query->is_main_query() ) {

    To this:

    	if ( ! is_admin() && ! is_front_page() && $query->is_main_query() ) {

    And that’ll prevent the post order from changing on your home page. You’ll see that there are only a few lines of code overall in this plugin. You can get help in the general WordPress forums if you need help with the process of renaming the file to fork the plugin (you’ll want FTP access to rename the plugin files, although others can help you with workarounds for that).

    • This reply was modified 11 months, 4 weeks ago by  Nick Halsey.
Viewing 1 replies (of 1 total)
  • The topic ‘Except on Homepage (Posts)’ is closed to new replies.