• Resolved pomalo

    (@pomalo)


    Hello,
    first I’m not an expert, I have wordpress vacation rentals theme which list rentals by default – published date (ID).
    In order to have some control of rental listing order I replaced in theme php code for ex. 'orderby' => 'meta_value_num', with 'orderby' => 'date',
    Basically replaced default order by Published date (ID or ‘meta_value_num’) with order by Modified date (‘date’).
    Editing modified date I can move rental up or down in listing.

    Regular theme updates and php code changes make modification of a few theme php files impossible for a non php expert, so I’m interested is it possible with your plugin to list properties by Modified date instead of by default Published date.

    All the best!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Marcel Pol

    (@mpol)

    Hi.
    Please be aware that this plugin only sorts terms. Terms, like tags and categories are only structure.

    I assume each property you have is a post, because that is content, not structure.
    Your best bet is to look at the pre_get_posts hook, where you can change the orderby. It is code that you can add to the functions.php of your theme or preferably child theme. Or you can add it to your own plugin.
    https://codex.ww.wp.xz.cn/Plugin_API/Action_Reference/pre_get_posts

    Alternatively, there are post order plugins, but I don’t know if you can set this with a checkbox.

    Thread Starter pomalo

    (@pomalo)

    Marcel thank you for info, all the best.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Can plugin replace default listing orderby=ID with ‘date’’ is closed to new replies.