Exclude categories For Custom post types

You’d probably be better served by creating a custom taxonomy to accompany your custom post type. That way you can manage terms separate from the built-in categories taxonomy. // Register Custom Taxonomy function wpse_168762_create_gallery_taxonomy() { $labels = array( ‘name’ => _x( ‘Gallery Categories’, ‘Taxonomy General Name’, ‘text_domain’ ), ‘singular_name’ => _x( ‘Gallery Category’, ‘Taxonomy Singular … Read more

Improving this link color picker code

Create customizer.js file and put the following script in the customizer.js file (function( $ ) { “use strict”; wp.customize( ‘tcx_link_color’, function( value ) { value.bind( function( to ) { $( ‘a’ ).css( ‘color’, to ); } ); }); })( jQuery ); And enqueue your customizer.js file by using wp_enqueue_script in your customizer.php file like this … Read more

My code for creating an admin option doesn’t work

Make Sure Your Functions, Slug and Callback Functions are Unique(Means Different from any other plugin or default WordPress). Also to save options use Settings API http://codex.wordpress.org/Function_Reference/register_setting <?php add_action(‘admin_menu’, ‘add_unique_custom_options’); function add_unique_custom_options() { add_options_page(‘Global Custom Options’, ‘Global Custom Options’, ‘manage_options’, ‘unique-functions’,’unique_custom_options’); } function unique_custom_options() { ?> <div class=”wrap”> <h2>Global Custom Options</h2> <form method=”post” action=”options.php”> <?php wp_nonce_field(‘update-options’) … Read more