jeremyHixon / RationalOptionPages

PHP Class for building Option Pages in WordPress
MIT License
207 stars 73 forks source link

Won't Display Value #42

Closed jvkrakowski closed 4 months ago

jvkrakowski commented 2 years ago

I've tried everything to get the value of the settings to display. I want to display the value on the front end via a page template, but nothing I'm doing works. Maybe I'm doing something wrong, can someone show me how they got theirs to work?

jeremyHixon commented 2 years ago

You get the options based on the ID of the page your creating: Screen Shot 2022-07-14 at 11 16 45 AM

This comes from the page definition: Screen Shot 2022-07-14 at 11 15 00 AM

Once you have the options stored in a variable, you can call them by referencing the ID used in the fields: Screen Shot 2022-07-14 at 11 18 29 AM

These are some examples of the definitions including the field IDs: Screen Shot 2022-07-14 at 11 17 52 AM

Displaying the value would be done with echo or print:

echo $date;
print $date;
Cyrille37 commented 4 months ago

Hi @jvkrakowski Did you fixe your problem ? Can you close this issue ?