Home Forums General Issues A Puzzle – Reference to Items in Option Page


A Puzzle – Reference to Items in Option Page

  • Hello,

    I would like to solve the case below:

    We have a series of featured buttons everywhere on our page. Each page has selected 4 featured buttons related to the page. Each button has 5-6 elements. Title, Text, Color, link, Icon graphic.

    We could create a repeat field for pages. Now.. we use same buttons on multiple pages. For example, same [See our Weekly deals] button could be on 10-12 pages. So I was thinking, could I create a set of buttons(40-50 variations) in option page, and select 4 particular buttons from each page.. Or should I create a custom post type called “Feature buttons” and reference the button from there?

    Or is there anyone who is smarter than me here? lol If so, please give me some ideas! Thanks!

  • If the Featured Buttons is going to allow many and you want to select which one to appear on any page, I would personally create a custom post type to hold them. Then on each page use a relationship field to allow the selection of as many or as few as are needed for the page. (I’d call them “Call to Action”)

    With a repeater on every page where they need to be created you’ll be recreating the same buttons over and over again.

    It would be difficult to create an options page and then select the ones you want to display on any page from the list created on the options page.

  • Okay! I’ll try that & post the result here.

  • Yep. DONE!
    1. Created a custom post type called “Button”
    2. Created a set of custom fields “title”, “text”, “color” to add additional fields for the custom post type “Button”.
    3. Created a repeater custom field to display a drop down menu on pages.
    4. Wrote a code to display the buttons.


    Now all we have to do is to select buttons from drop down menu on pages. YEEEES

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘A Puzzle – Reference to Items in Option Page’ is closed to new replies.