Support

Account

Home Forums Add-ons Options Page Shortcode and Options Page

Solved

Shortcode and Options Page

  • I have a field type “text” called “hours”. What I am trying to do is show text for that field in the footer of my site using the “Options Page” addon. And then I also want that “hours” field’s value to show within the content of the wysiwyg editor using something like a shortcode.

    Is there a way to do this? I tried using the shortcode in the wysiwyg editor to a field that I use for the Options Page but the shortcode doesn’t pull anything. The shortcode only seems to work if I choose (Post Type is equal to Page”.

    My goal is to only have to edit the textfield in one spot but have it show in my template footer, and allow users to added it with the wysiwyg editor.

    Thanks

  • Hi @wally

    I think I understand your issue.. basically you want to display a value from an options page in any regular page using the shortcode.

    I’ve never used the shortcode functionality myself but I’ll try to help you out.

    Would you try this:

    
    [acf field="hours" post_id="options"]
    
  • I could have sworn I that I tried that, but you are correct. I just tested it with post_id=”options” and it works! Even with text area field type it works.

    Thanks for the help!

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

The topic ‘Shortcode and Options Page’ is closed to new replies.