Contact Form 7 Redirect

add_action( 'wp_footer', 'mycustom_wp_footer' ); function mycustom_wp_footer() { ?> document.addEventListener( 'wpcf7mailsent', function( event ) { if ( '4423' == event.detail.contactFormId ) { location = 'https://secova.com/thank-you-demo'; } if ( '4513' ==...

Leverage browser caching & Enable Compression

Copy the code snippets and paste it inside your .htaccess file. # Enable Compression AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/vnd.ms-fontobject...

Register widget in WordPress

function my_custom_theme_widgets() { register_sidebar( array( 'name' => 'My Widget', 'id' => 'widget_id', 'before_widget' => '', 'after_widget' => '', 'before_title' => '', 'after_title' => '', ) ); } add_action('widgets_init',...

Register custom post & custom taxonomy in WordPress

Register custom post type add_action( 'init', 'my_theme_custom_post' ); function my_theme_custom_post() { register_post_type( 'cpt', array( 'labels' => array( 'name' => __( 'CPTs' ), 'singular_name' => __( 'CPT' ) ), 'supports' => array('title', 'editor',...

WP Plugin QuickStart Pack

//Plugin information /* Plugin Name: Your plugin Name Plugin URI: http://example.com/pluginsurl Description: Given your plugin description here. Author: Author Name Version: 1.0 Author URI: http://example.com/ */ //The latest jquery need to use every plugin function...