$( ".owl-fade-slider .owl-carousel" ).data( 'owlCarousel' ).reinit( {
transitionStyle: "fade",
autoPlay: 4000
} );
Redirecting HTTP to HTTPS
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L]
Remove WP Generator Meta Tag
Put in functions.php file in your theme:
/**
* Remove WP Generator Meta Tag
*/
function wp_98_remove_generator_meta_tag() {
remove_action( 'wp_head', 'wp_generator' );
}
add_action( 'init', 'wp_98_remove_generator_meta_tag' );
Seeking You
What you seek is seeking you
Page Slug as Body Class
/*
* Page Slug as Body Class
*/
function add_slug_to_body_class( $classes ) {
global $post;
if ( isset( $post ) ) {
$classes[] = $post->post_type . '-' . $post->post_name;
}
return $classes;
}
add_filter( 'body_class', 'add_slug_to_body_class' );
Add Page Template Column on Admin Page Table
/*
* Add Page Template Column on Admin Page Table
*/
function asiq_page_column_views( $defaults ) {
$defaults['page-layout'] = __( 'Template' );
return $defaults;
}
add_filter( 'manage_pages_columns', 'asiq_page_column_views' );
function asiq_page_custom_column_views( $column_name, $id ) {
if ( $column_name === 'page-layout' ) {
$set_template = get_post_meta( get_the_ID(), '_wp_page_template', true );
if ( $set_template == 'default' ) {
echo 'Default';
}
$templates = get_page_templates();
ksort( $templates );
foreach ( array_keys( $templates ) as $template ) {
if ( $set_template == $templates[ $template ] ) {
echo $template;
}
}
}
}
add_action( 'manage_pages_custom_column', 'asiq_page_custom_column_views', 5, 2 );
Remove Related Products WooCommerce
/**
* Remove related products output
*/
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20 );
add_filter('woocommerce_product_related_posts_query', '__return_empty_array', 100);
নাবিক মন কূল ফিরে পাবে
এই ভুলের হিসাব মোর জানি মিলে যাবে,
আর আমার নাবিক মন কূল ফিরে পাবে,
তাই আগের মতন আমি বুকভরা প্রেম নিয়ে আসি………
CSS/JS Cache Busting
/*
* Disable CSS/JS Cache
*/
function wpse_84670_time_as_version( $url ) {
return add_query_arg( array( 'ver' => time() ), $url );
}
add_filter( 'script_loader_src', 'wpse_84670_time_as_version' );
add_filter( 'style_loader_src', 'wpse_84670_time_as_version' );
Reorder Comment Forms Fields
/*
* Reorder Comment Forms Fields
*/
function ar_move_comment_field_to_bottom( $fields ) {
$comment_field = $fields['comment'];
unset( $fields['comment'] );
$fields['comment'] = $comment_field;
return $fields;
}
add_filter( 'comment_form_fields', 'ar_move_comment_field_to_bottom' );