How to enable allow CORS Policy Header in WordPress?
I’ve used a few different WordPress API’s – but for those of you using the ‘official’ WP-API, I had much trouble with this CORS — and what I found was that between
I’ve used a few different WordPress API’s – but for those of you using the ‘official’ WP-API, I had much trouble with this CORS — and what I found was that between
Add this code to your theme’s functions.php file, and it will limit minimum image dimentions /** * wpdevkit.in */ add_filter(‘wp_handle_upload_prefilter’,’tc_handle_upload_prefilter’); function tc_handle_upload_prefilter($file) { $img=getimagesize($file[‘tmp_name’]); $minimum = array(‘width’ => ‘640’, ‘height’ => ‘480’);
/** * paste this code in your function.php file , (by wpdevkit.in) */ function wpb_login_logo() { ?> <style type=”text/css”> #login h1 a, .login h1 a { background-image: url(http://wpdevkit.in/wp-content/uploads/2020/06/apple-touch-icon.png); height: auto;
/** * adding scripts for specific page/post with page id=17 (wpdevkt.in) */ function schemas_for_specifice_page(){ global $post; if($post->post_type == ‘page’ && $post->ID == ’17’){ echo ‘Your code here’; } } add_action(‘wp_head’,’schemas_for_specifice_page’);
// wordpress custom shortcode by wpdevkit.in function sdSlidesShortCode($attr){ $array = shortCodeAtts(array( ‘id’ => ”, ), $attr); global $wpdb; $table_name = $wpdb->prefix . “”; $id = $array[‘id’]; $results = $wpdb->get_results(“SELECT
Create custome tempate in worpdress <?php /* Template Name: my_first_custom_template*/ ?> <?php get_header(); ?> <div id=”primary” class=”content-area”> <main id=”main” class=”site-main” role=”main”> <?php // Start the loop. while ( have_posts() )
Dharmanagar, Tripura, India.