Populate select fields depending on what page ID is

Support General Populate select fields depending on what page ID isResolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #26510
    Martin AsshetonMartin Assheton
    Participant

    Hi, getting on really well with MetaBox, keep up the good work 🙂

    Please could you assist with some insight in how to do the following:
    rwmb_meta_boxes filter runs on every page/request. I have some big queries for populating select fields and I would like to fire these queries on only two pages 'front-end' else leave the select options empty on all other pages to optimise the site.

    rwmb_meta_boxes fires before any wp templating/page processing so I cannot use 'is_page' or similar functions.

    I'd be very grateful if you can point me in the right direction for a solution.
    Cheers

    #26521
    Long NguyenLong Nguyen
    Moderator

    Hi Martin,

    You can use the extension MB Include Exclude to load the meta box for a/some specific page. Get more details here https://docs.metabox.io/extensions/meta-box-include-exclude/.

    Or show a field base on some conditions with MB Conditional Logic https://docs.metabox.io/extensions/meta-box-conditional-logic/.

    #26638
    Martin AsshetonMartin Assheton
    Participant

    Thank you! I'll give this a try

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.