问题
I have installed the redux plugin via wordpress and great and all.
I have been using the demo content to get the used to the framework, but I can't figure out how to call the data in the template?
I have been using option tree for a long time and figured that one out..
this is what I thought would be the proper call out but I guess not..
This is the code I thought would get the logo uploaded.
<?php global $redux_demo; echo $redux_demo['media'];?>
回答1:
Have you tried this? <?php global $redux_demo; echo $redux_demo['media']['url'];?>
回答2:
Redux Framework create an array of MEDIA
You can access MEDIA info i.e.
Define
global $redux_demo;
To access
- ID :
echo $redux_demo['media']['id'];
- TYPE :
echo $redux_demo['media']['type'];
- URL :
echo $redux_demo['media']['url'];
- ID :
etc.
For more details refer https://github.com/ReduxFramework/ReduxFramework/wiki/Fields
回答3:
You can also shorthand it: $GLOBALS['redux_demo']
来源:https://stackoverflow.com/questions/21107180/redux-framework-wordpress-calling-variable