This website uses cookies to remember you and improve your experience. For more info see our Privacy Policy.

Mobile Menu

  • About Us
  • Business Websites
  • Portfolio
  • Pricing & Services
    • Custom Web Design
    • Website Redesign
    • WordPress Website Maintenance
  • Plugins
    • MyBookTable
    • MySpeakingEvents
    • Plugin Support
      • Plugin Knowledge Base
  • Contact
  • Menu
  • Skip to right header navigation
  • Skip to main content

Stormhill Media

Custom websites for every type of business

Header Right

  • About Us
  • Business Websites
  • Portfolio
  • Pricing & Services
    • Custom Web Design
    • Website Redesign
    • WordPress Website Maintenance
  • Plugins
    • MyBookTable
    • MySpeakingEvents
    • Plugin Support
      • Plugin Knowledge Base
  • Contact

tag order question

Home » Developer Resources » tag order question
Is there a way to specify that one tag should display in order of the date the book was added, but have the rest display normally? Use this code – it worked.function custom_mbt_pre_get_posts($query) {    if($query->is_tax(‘mbt_tag’) and $query->get(‘mbt_tag’) == ‘TAG SLUG GOES HERE’) {        $query->set(‘orderby’, ‘post_date’);        $query->set(‘order’, ‘ASC’);    }}add_action(‘pre_get_posts’, ‘custom_mbt_pre_get_posts’, 50);

« Previous
Next »

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Site Footer

Quick Links:

  • Contact Us
  • Pricing & Services
  • Sitemap
  • Terms/Conditions
  • Privacy Policy
(512) 914-8458

Copyright © 2021 · Stormhill Media All Rights Reserved.
Website by Stormhill Media
Log in