How to remove the cufon script from Dzonia Lite theme [closed]

You can remove scripts with wp_dequeue_script(): function wpse99450_remove_cufon() { wp_dequeue_script( ‘inktheme-confu-ui’ ); // inktheme-confu-ui is the script’s handle, according to your posted code } add_action( ‘wp_enqueue_scripts’, ‘wpse99450_remove_cufon’, 20 ); // set priority to ’20’ so it will run later than the default But be careful — as @gdaniel pointed out, if the theme depends on … Read more

Get term name and term parent into custom post type permalink

I solved this issue by the following codes where you need to define “rewrite” argument as follows register_taxonomy( ‘map_categories’, ‘map’, array( ‘hierarchical’ => true, ‘label’ => ‘Catégories’, ‘query_var’ => true, ‘rewrite’ => array(‘slug’=>’commerce/artisans’,’with_front’=>false, ‘hierarchical’ => true) ) ); You need to understand that ‘hierarchical’ in rewrite actually solve your purpose. After the update in codes … Read more

How to add “Template” option in page attributes panel?

If there is everything OK with your template file (it should be placed in root directory of your theme) and the comment is correct then there can be one more thing… There is/was some mysterious bug, that was preventing template select from appearing. You can read about this bug here: https://core.trac.wordpress.org/ticket/18324 It’s closed, because it … Read more

how to give a user a role?

or / NOTE: Of course change 3 to the appropriate user ID $u = new WP_User( 3 ); // Remove role $u->remove_role( ‘subscriber’ ); // Add role $u->add_role( ‘editor’ ); Super Admin – somebody with access to the site network administration features and all other features. See the Create a Network article. Administrator – somebody … Read more

Where to hook settings api init

Try it like this: if (isset($_REQUEST[‘tab’]) && $_REQUEST[‘tab’]) { typesetter_save_settings(); } register_sections(); $current = isset($_REQUEST[‘tab’]) ? $_REQUEST[‘tab’] : ‘page’; You have to check for a certain field of $_REQUEST (or $_POST etc.) before accessing it—or you get warnings.