PHP Functions available in MZ specifcally Custom Fields and ShortCodes
Hey all,
Where can i find a list of the 60 or so PHP functions available in MZ virtual templates. I looking for a way to incorporate custom fields into the template. Since get_post_meta I thought about creating a custom shortcode but do_shortcode is not available either. Imagine if we could use do_shortcode the functionality of this theme is just endless. Any suggestions or help, other than creating a physical template, which is my last option here. -Shocka |
The codes are listed in the Limited PHP Codes drop down.
|
Quote:
Quote:
Quote:
|
Thanks Larry and Jerry - i cannot believe I missed that drop down!
Jerry - I tried the widget idea but with the widget styling it threw everything off. Maybe there is an idea here I am missing? Perhaps you can setup variables in the widget so it never outputs anything and use those variables with printf? Just a thought but seems messy with useless HTML being outputted. As for the shortcodes I use http://wordpress.org/extend/plugins/shortcode-exec-php/ and prefer to use this method for PHP code since all my PHP sits in one spot. Right now I am thinking of using a physical template with shortcodes. |
Any PHP Anywhere Update
This Has Been Tested and It Does Wonders
This technique takes the Any PHP Anywhere concept to a whole new level. Update: With this technique, you can use php in posts and pages, outside of sidebars. Update: Here's an example of conditional widgets. Quote:
Quote:
HTML Code:
<echo custom_fill_widget();> PHP Code:
Other things besides the page title could be used as conditions. For example, a restaurant could post the soup of the day in a widget with code such as: PHP Code:
Also, instead of just being, essentially, a string table, this function could call other functions, or even include files. As far as a little extra html and css to use the widgets, my take on that is that WP outputs so much more bloat code than we would if we were writing code from scratch in notepad or something. So, what's a few more grains of sand on the beach? As long as whatever it outputs is consistent, we can style it so it looks fine to the user. Quote:
I couldn't get other things to work like I wanted in pages or templates (outside of sidebars.) I tried the ezphp plugin and even tried filtering (although I haven't tried filtering with output buffering yet), but they didn't work like I wanted, either. Remember, you can even make your entire content area a sidebar if you needed to. I've tried it, and it works. A sidebar can also replace the footer or the header. Quote:
Quote:
Please post your results. Thanks. |
All times are GMT -6. The time now is 03:31 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.