Trim Custom Excerpts
A custom excerpt allows you to write exactly what you want shown for the excerpt. Because of this, when the theme detects a custom excerpt, it displays the full text without trimming it. If you’re using elements like Post Cards…
A custom excerpt allows you to write exactly what you want shown for the excerpt. Because of this, when the theme detects a custom excerpt, it displays the full text without trimming it. If you’re using elements like Post Cards…
This snippet shows how you can modify the output of any "block" or "section" of the Post Types Grid element. So for example if you want you could override the default featured image display ("media" section) with your own custom…
/* * Adds a new badge to product entry for any product added in the last 30 days. * Simply add to child theme's functions.php file then add some css to your site to style it. * If you want…
add_action( 'wp_footer', function() { ?> ( function( $ ) { 'use strict'; $( document ).on( 'ready', function() { var $entriesWithRedirect = $( '.has-redirect' ) $entriesWithRedirect.each( function() { var $this = $( this ); $this.find( 'a' ).attr( 'target', '_blank' ); }…
body .wpex-open-submenu span { font-family: "Arial"; font-size: 16px; } body .wpex-open-submenu span::before { content: "\002B" !important; font-family: "Arial" } /* Show minus icon when active */ body .wpex-open-submenu[aria-expanded="true"] span::before { content: "\2212" !important; }
add_action( 'woocommerce_shop_loop_item_title', function() { if ( function_exists( 'wpex_get_first_term_link' ) && $link = wpex_get_first_term_link( null, 'product_cat' ) ) { echo '' . $link . ''; } }, 11 );
This code will add a unique class to each tab and tab content in the format of tab-index-{count} so if you need to target tabs independently via CSS it would be possible.
If you want to modify the video embed URLs used in lightboxes in the Total WordPress Theme, you can use the wpex_get_video_embed_url_params filter. This filter allows you to add or change URL query parameters for YouTube and Vimeo embeds. It’s…
// Alter the layout for the courses post type // Choices: left-sidebar, right-sidebar, full-width or full-screen add_action( 'wpex_post_layout_class', function() { if ( is_singular( 'sfwd-courses') ) { $layout = 'full-width'; } return $layout; }, 40 );
// Remove staff settings metabox add_filter( 'wpex_main_metaboxes_post_types', function( $types ) { unset( $types['staff'] ); return $types; }, 40 ); // Remove staff gallery add_filter( 'wpex_gallery_metabox_post_types', function( $types ) { $types = array_combine( $types, $types ); unset( $types['staff'] ); return $types;…