notice-error , notice-warning , notice-success , or notice-info < div class = "notice notice-success is-dismissible" style = " ma…
Read more<script type="text/javascript"> var userLang = document.documentElement.lang; console.log ("The language is: " + userLang); &l…
Read more//check post visibility if ( get_post_status ( 932 ) == 'publish' ){ if ( post_password_required ( 932 )) { $postStatus = 'pass…
Read more$value = get_post_meta ( $post -> ID , 'post-meta-box-id-name' , true ); it return the direct value in string if we remove 3rd argument tru…
Read moreadd post meta box and save it to db
//adding meta box to each post type for auto notifications add_action ( 'admin_init' , 'add_custom_fields' ); function add_custom_field…
Read moreupload image to wordpress
https://webomnizz.com/custom-image-upload-in-wordpress/
Read more/* * Creating a function to create our CPT */ function custom_post_type () { // Set UI labels for Custom Post Type $labels = array ( …
Read more< form method = "post" action = "" > < span > Select languages </ span >< br /> < input type =…
Read more//post and page updated -send email to admin function pnr_auto_send_email ( $post_id ) { global $post ; // If this is just a revi…
Read moreGET Location from ip in php
$ip = '117.197.234.146' ; $details = json_decode(file_get_contents( "http://ipinfo.io/{$ip}/json" )); echo $details->city; // -…
Read moremake stickey div in wordpress plugin
< style > .kanha { top : 32px ; } </ style > < div class = "container mt-3" > <!-- welcome message --> &…
Read morepublic function curl_delete ( $url ) { $ch = curl_init ( ) ; curl_setopt ( $ch , CURLOPT_URL , $url ) ; curl_setopt ( $ch , CURLOP…
Read morepactl -- set-sink-volume 1 150%
Read morefunction post_published_notification ( $post_id , $post ) { $author = $post -> post_author ; /* Post author ID. */ $name = get_the_author…
Read moreopen a small windows in same tab
function webpushr_signup_popup (){ window . open ( 'https://app.webpushr.com/signup?url= <?= site_url (); ? > ' , "wpushr…
Read morefunction dbk_enqueue_scripts () { wp_enqueue_script ( 'debugger_custom_js' , plugins_url ( 'js/debugger-kanha.js' , __FILE__ ), array …
Read moreauto sorting disabled
<! DOCTYPE html > < html > < head > < title > Title of the document </ title > < link href = "https://cdnjs.…
Read morecheck email exist or not
global $wpdb; $table_name = $wpdb->prefix . "wcmnd_analytics" ; $email = "hivejat556@carpppetd.com" ; …
Read morecheck woocommerce active or not
if ( class_exists( 'WooCommerce' ) ) { // some code } else { / more code }
Read morefunction wpb_adding_scripts () { wp_register_script ( 'my_amazing_script' , plugins_url ( 'amazing_script.js' , __FILE__ ), array ( &…
Read morecopy to clipboard
//function for copy to clipboard data function copyToClipboard ( element ) { var $temp = $ ( "<input>" ); $ ( "body" ). a…
Read morevar formData = $( '#contact_form' ). serializeArray (); formData. push ({ name : "<something>" , value : "<somevalue>…
Read moreinsert data into wordpress table
<?php if ( isset ( $_POST [ 'submit' ] ) ) { global $wpdb ; $tablename = $wpdb - > prefix . 'post_job' ; …
Read more