Day: October 24, 2017

Select Text on Click of a Div with CSS

[php] .selectable{ -webkit-touch-callout: all; /* iOS Safari */ -webkit-user-select: all; /* Safari */ -khtml-user-select: all; /* Konqueror HTML */ -moz-user-select: all; /* Firefox */ -ms-user-select: all; /* Internet Explorer/Edge */ user-select: all; /* Chrome and Opera */ } [/php]

How to Set a default Title for the custom post?

[php] function wpl_lc_add_custom_title( $data, $postarr ) { if($data[‘post_type’] == ‘wpl_lcp_shortcodes’) { if(empty($data[‘post_title’])) { $data[‘post_title’] = ‘Untitled Carousel’; } } return $data; } add_filter(‘wp_insert_post_data’, ‘wpl_lc_add_custom_title’, 10, 2 ); [/php] Now use the function [php] the_title(); [/php]