Theme options on CPT
The theme developers answered this for me earlier, the answer is easy enough… http://www.thecodepoetry.com/add-the7-meta-boxes-to-custom-post-types/
The theme developers answered this for me earlier, the answer is easy enough… http://www.thecodepoetry.com/add-the7-meta-boxes-to-custom-post-types/
I would recommend a color option. Generally, a color option just loads a separate style sheet. E.g., loading the style-blue.css style sheet would include all those elements you wanted to be blue. (You would load this in addition to your main style sheet.) This is how many themes work, so this a proven approach. This … Read more
It appears that there is not a simple way of doing this. Looking around, I see 2 ways you could do something like this. The first, and in my opinion less elegant way would be to inject HTML into the section’s description parameter. You could then wire some JS to your custom HTML to make … Read more
In order for the submitted value to persist, you need to save it into the corresponding option array. To do that, you can add another function (pe_save_settings() in this case) to catch the form submission and save the field’s content. Here’s the full working code: <?php /* Plugin Name: Test option page Text Domain: test-option-page … Read more
This is a good use case for a local development environment. But, yes, if all you did was change files in the theme, then nothing that was saved to your database will be altered. If you are worried about things breaking, then I suggest getting a local copy of your WP install running and test … Read more
Is it possible to dynamically output the name of the widgets?
add_action(‘admin-init’, ‘testTheme_custom_settings’);. Action specified here is wrong. Update it to: add_action(‘admin_init’, ‘testTheme_custom_settings’); And it should work.
Issues Saving Long String Option
If this is in functions.php, then you don’t need a hook for this at all, because the functions.php file is loaded right where you want it. So just unwrap this and move it out of a function call altogether; i.e., still in your functions.php, but not attached to any specific hook. Or, use the after_setup_theme … Read more
You can use this code in your functions.php to hide the TopBar category. function the_category_filter($thelist,$separator=” “) { if(!defined(‘WP_ADMIN’)) { //list the category names to exclude $exclude = array(‘TopBar’); $cats = explode($separator,$thelist); $newlist = array(); foreach($cats as $cat) { $catname = trim(strip_tags($cat)); if(!in_array($catname,$exclude)) $newlist[] = $cat; } return implode($separator,$newlist); } else return $thelist; } add_filter(‘the_category’,’the_category_filter’,10,2);