How to reset a custom theme

If you look into the file includes/admin/theme-admin.php you’ll see that the theme’s options are stored in ‘themezee_options’. You can either delete these options per database manager or per a plugin. If you aren’t familiar with database operations, copy the following code into a PHP file, install it as plugin and activate it once. Then deactivate … Read more

Using JQuery to check for Rel Attribute of Image before Overriding It

/*———————————————————————————–*/ /* Add rel=”lightbox” to image links if the lightbox is enabled */ /*———————————————————————————–*/ if ( jQuery( ‘body’ ).hasClass( ‘has-lightbox’ ) && ! jQuery( ‘body’ ).hasClass( ‘portfolio-component’ ) ) { jQuery( ‘a[href$=”.jpg”], a[href$=”.jpeg”], a[href$=”.gif”], a[href$=”.png”]’ ).each( function () { var imageTitle=””; if ( jQuery( this ).next().hasClass( ‘wp-caption-text’ ) ) { imageTitle = jQuery( this ).next().text(); … Read more

Re-skinning Site

editor-style.css is used to style TinyMCE, the rich-text-editor employed by WordPress. Look for a plain style.css file in your theme – if it has been written with Starkers as a base, it ought to have one. I don’t mean to be impolite, but if you could not figure out that you were looking at the … Read more

How to assign custom template to specific products in Woocommerce?

If the changes you need are strictly CSS, you can add the category names as classes to the body_class via the body_class filter. add_filter(‘body_class’,’wpa76627_class_names’); function wpa76627_class_names( $classes ) { if( is_singular( ‘product’ ) ): global $post; foreach( get_the_terms( $post->ID, ‘product_cat’ ) as $cat ) // maybe you want to make this more unique, like: // … Read more

Color Options from Theme Customizer API not returning via get_theme_mod()

If your settings are stored as Theme Mods, rather than as a Settings API option, then you need to pass the appropriate value to the type parameter to $wp_customize->add_setting(): ‘option’: Settings API option (get_option()) ‘theme_mod’: Theme Mods API option (get_theme_mod()) Try changing this: $wp_customize->add_setting( $this_theme . ‘_theme_options[‘. $setting .’]’, array( ‘default’ => $param[‘default’], ‘sanitize_callback’ => … Read more

Problems to disable the comments for my statics pages

First of all, thanks to Ian Stewart for the codes here- In functions.php paste the following codes: // Template for comments and pingbacks. if ( ! function_exists( ‘my_comment’ ) ) : function my_comment( $comment, $args, $depth ) { $GLOBALS[‘comment’] = $comment; switch ( $comment->comment_type ) : case ‘pingback’ : case ‘trackback’ : // Display trackbacks … Read more