Skip to content

Include or Exclude Gallery Metabox from Post Types

Include or Exclude Gallery Metabox from Post Types

function my_gallery_metabox_post_types( $types ) { // Add to portfolio $types[] = 'portfolio'; // Remove from staff unset( $types['staff' ] ); // Return types return $types; } add_filter( 'wpex_gallery_metabox_post_types', 'my_gallery_metabox_post_types', 99 );

Read more

Add Videos To WooCommerce Products

// Add video field to Total metabox for WooCommerce products function add_woo_to_product_settings( $array ) { // Create your own tab - cool! $array['woo_video_tab'] = array( 'title' => __( 'Video', 'wpex' ), // Tab title 'post_type' => array( 'product' ), //…

Read more

Allow Skype Links In The Theme

The Total theme uses the core WordPress esc_url function to sanitize links which by default strips out the skype protocal. You can use this function to allow it in your theme (any theme).

Read more

Disable WordPress SEO by Yoast Page Analysis

// Disable WordPress SEO by Yoast Page Analysis which seems to cause issues with the Visual Composer function disable_wpseo_use_page_analysis() { return false; } add_filter( 'wpseo_use_page_analysis', 'disable_wpseo_use_page_analysis' );

Read more

Add/Remove Image Sizes

This example snippet can be used to add new image size options and tabs to the Image Sizes panel. This is useful if you are developing a third-party add-on for the theme. If you are creating custom post types using…

Read more

Custom Blog Style

/** * Alter blog style * You can return any of the following strings "large-image-entry-style", "thumbnail-entry-style", "grid-entry-style" * */ function my_blog_style( $style ) { // Change style for all tags if ( is_tag() ) { $style = 'thumbnail-entry-style'; } //…

Read more
Back To Top