Snippet: Alter Default Post Slider Position
/**
* Alter the default post slider position
*
* Default : 'below_title'
* Choices : 'below_title', 'above_title', 'above_menu', 'above_header', 'above_topbar'
*
*/
function my_page_slider_position( $position, $meta = '' ) {
// Change position to "above_title" unless custom position is defined via meta setting
if ( ! $meta ) {
$position = 'above_topbar';
}
// Return position
return $position;
}
add_filter( 'wpex_post_slider_position', 'my_page_slider_position', 10, 2 );
All PHP snippets should be added via child theme's functions.php file or via a plugin.
We recommend Code Snippets (100% Free) or WPCode (sponsored)
We recommend Code Snippets (100% Free) or WPCode (sponsored)