Skip to content

Add Custom Block to Post Content Builder Element

Add Custom Block to Post Content Builder Element

/** * Register new block for the Post Content element. * * @link https://totalwptheme.com/docs/snippets/custom-block-post-content-module/ */ add_filter( 'vcex_post_content_blocks', function( $blocks ) { $blocks['my_custom_block_callback'] = 'My Custom Block Name'; return $blocks; } ); /** * Callback function for the "my_custom_block_callback" Post Content…

Read more

Query Items From Different Blogs on a Multisite

In WordPress there is no way to use the core WP_Query class to pull items from different multisite installations. For this reason if you want to insert a Total module on a multisite that queries items from a different site…

Read more

Insert Content Before or After any Element

Below are 2 very basic sample functions showing you how you could insert content before or after Total builder modules/shortcodes. Note that the action does pass on both the $shortcode and $atts variables. The $shortcode variable is the name of…

Read more

Custom Post Type Archive Columns

This snippet shows how you could hook into the "wpex_get_grid_entry_columns" filter to alter the default columns for a post type archive. However, if you are using the Post Types Unlimited plugin you have settings available for this so you don't…

Read more

Custom Categories List Separator

By default the Total theme uses a comma to separate categories/terms when displaying them as a list such as in the Post Meta. You can easily alter this default separator using a theme filter like the example below which will…

Read more

Remove Author Links from Post Meta & Author Bio

// Remove author URL from bio add_filter( 'wpex_post_author_bio_data', function( $data ) { unset( $data['posts_url'] ); return $data; } ); // Remove author URL from WordPress the_author_posts_link function add_filter( 'the_author_posts_link', function( $link ) { if ( ! is_admin() ) { return…

Read more
Back To Top