Support » Plugin: Gutenberg Template and Pattern Library & Redux Framework » display options in frontend of website

  • Resolved themerevel

    (@themerevel)


    Where in the documentation is listed how to display options settings or metabox settings in the theme or plugins?

    global $redux_demo; // This is your opt_name.
    and to echo the option
    
    echo $redux_demo['the option id'];
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Kev Provance

    (@kprovance)

    That’s pretty much how to do it, although you can’t use spaces in option IDs.

    Metaboxes uses a different API: https://devs.redux.io/core-extensions/metaboxes.html

    Thread Starter themerevel

    (@themerevel)

    I’m getting a warning

    
    Warning: Trying to access array offset on value of type null in /var/www/html/wp-content/plugins/weather/includes/weather-config.php on line 347
    
    
    Plugin Author Kev Provance

    (@kprovance)

    I have no way of knowing how you are using Redux based on one error message. You would need to post your entire options-config.php and the block (not just the line) of code that’s not working. Chances are, something is being done incorrectly.

    Thread Starter themerevel

    (@themerevel)

    this line is giving me the warning echo $redux_demo['the option id'];

    do I need to add an if statement?

    Plugin Author Kev Provance

    (@kprovance)

    Again, without seeing your entire Redux config and the BLOCK of code that is giving you the error, I have no way of knowing what is happening. Historically, it’s because devs are doing something incorrectly (and as I indicated previously, you CANNOT use option IDs that contain spaces. It won’t work).

    I suggest you load the Redux sample config (Settings > Redux > Enable Panel Demo) and begin your work there. I suggest this because I know the demo panel works. PLEASE, change the opt_name, and the page_slug arguments since using the defaults will lead to problems after you release your project.

    I would also suggest thoroughly reviewing the docs site: https://devs.redux.io/ and start with the Guides section. Also, to use Redux (and write themes/plugins), you need, at a minimum, a moderate level of PHP knowledge.

    Good luck.

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