Skip to main content

Posts

Showing posts from 2016

High light Search Result In Wordpress

High light Search Result In Wordpress add this function in your themes function.php function highlight_results ( $ text ) {      if ( is_search ( ) ) { $ keys = implode ( '|' , explode ( ' ' , get_search_query ( ) ) ) ; $ text = preg_replace ( '/(' . $ keys . ')/iu' , '<span class="search-highlight">\0</span>' , $ text ) ;      }      return $ text ; } add_filter ( 'the_content' , 'highlight_results' ) ; add_filter ( 'the_excerpt' , 'highlight_results' ) ; add_filter ( 'the_title' , 'highlight_results' ) ;   function highlight_results_css ( ) { ? > <style> .search-highlight { background-color : #FF0 ; font-weight : bold ; } </style> < ? php } add_action ( 'wp_head' , 'highlight_results_css' ) ;

Add custom sidebar

__( 'Sidebar name', 'theme_text_domain' ), 'id' => 'unique-sidebar-id', 'description' => '', 'class' => '', 'before_widget' => ' ', 'after_widget' => ' ', 'before_title' => ' ', 'after_title' => ' ' ); ?>

Remove playlist from youtume iframe

css animation

<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> <script> $(document).ready(function(){     $("#hide").click(function(){         $("p").hide();     });     $("#show").click(function(){         $("p").show();     }); }); </script> <style> /* animation sets */ /* move from / to  */ .pt-page-moveToLeft {     -webkit-animation: moveToLeft .6s ease both;     -moz-animation: moveToLeft .6s ease both;     animation: moveToLeft .6s ease both; } .pt-page-moveFromLeft {     -webkit-animation: moveFromLeft .6s ease both;     -moz-animation: moveFromLeft .6s ease both;     animation: moveFromLeft .6s ease both; } .pt-page-moveToRight {     -webk...