Skip to content

Simple Custom Shortcode for Displaying Posts

Simple Custom Shortcode for Displaying Posts

// Add a new custom grid shortcode module // Usage [myprefix_custom_grid posts_per_page="4" term="4"] // You can also go to Visual Composer > Shortcode Mapper to add your custom module function myprefix_custom_grid_shortcode( $atts ) { // Parse your shortcode settings with…

Read more

Display Sidebar Mobile Megamenu as 1 list

.sidr-class-megamenu ul .sidr-class-dropdown-toggle { display: none !important; } .sidr-class-megamenu > ul > li > a { display: none !important; padding: 0 !important; height: 0; } .sidr-class-megamenu ul ul { display: block !important; }

Read more

Add New Blog Entry/Post Meta Item

function myprefix_add_blog_meta_blocks( $blocks ) { $blocks['new_section'] = function() { $icon = wpex_get_theme_icon_html( 'folder-o', 'wpex-mr-10' ); echo $icon .'Your stuff here'; }; return $blocks; } add_filter( 'totaltheme/blog/meta_blocks/singular_blocks', 'myprefix_add_blog_meta_blocks' ); add_filter( 'totaltheme/blog/meta_blocks/entry_blocks', 'myprefix_add_blog_meta_blocks' );

Read more

Add New Top Bar Social Options

add_filter( 'totaltheme/topbar/social/choices', function( $options ) { // Add phone number option $options['phone'] = array( 'label' => 'Phone', 'icon_class' => 'ticon ticon-phone', ); // Return options return $options; } );

Read more

Add Custom Advertisements Randomly in Blog Archives

This is an advanced javascript function you will have to modify it to work for your needs. Because of it's complexity it should be used only by people that know what they are doing and can modify it accordingly. Any…

Read more

Custom Topbar Social Link for Another Language (WPML)

add_action( 'after_setup_theme', function() { // Get global Customizer settings global $wpex_theme_mods; // Check if topbar facebook value is set if ( isset( $wpex_theme_mods['top_bar_social_profiles']['facebook'] ) ) { // Get current language $current_language = defined( 'ICL_LANGUAGE_CODE' ) ? ICL_LANGUAGE_CODE : ''; //…

Read more

Related Blog Posts From Current Post 1st Category Only

// Alter the related blog posts query to grab items from first category add_filter( 'wpex_blog_post_related_query_args', function ( $args ) { // Get first category $cats = wp_get_post_terms( get_the_ID(), 'category' ); // Get from 1st category only $cats['category__in'] = array( $cats[0]->term_id…

Read more

Display Past Events (Events Calendar Plugin)

You can use the "vcex_query_args" filter to tweak the query arguments for any Total theme element that displays posts. The example below shows you how you can filter out the query for a custom Events Calendar Display. Note, the "vcex_grid_query"…

Read more
Back To Top