This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action('admin_menu', 'myTheme_admin'); | |
function myTheme_admin() { | |
/* Base Menu */ | |
add_menu_page( | |
'myTheme settings', // Admin page title | |
'myTheme settings', // Admin menu label | |
'manage_options', | |
'myTheme-general-options', // Admin slug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
var style = $('#yourtheme-color-scheme-css'), | |
api = wp.customize; | |
if (!style.length) { | |
style = $('head').append('<style type="text/css" id="yourtheme-color-scheme-css" />') | |
.find('#yourtheme-color-scheme-css'); | |
} | |
// Color Scheme CSS. | |
api.bind('preview-ready', function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Hide/Show a any div element by selecting a categories for a wordpress theme. | |
* | |
* Copy all of these functions to your function.php file, | |
* | |
* and call => do_action( | |
* 'mythemeprefix_hide_meta_for_categories', | |
* array("category1","category2"), | |
* 'my_meta_id_div' |