Disable WordPress Admin Bar for All Users Except Administrators
Disable WordPress Admin Bar for All Users Except Administrators
Disable WordPress Admin Bar for All Users Except Administrators
Accessing form data in JS
access values from FormData
Get key and value from FormData
Get WordPress post content by post id $my_postid = 12;//This is page id or post id $content_post = get_post($my_postid); $content = $content_post->post_content; $content = apply_filters(‘the_content’,
Insert comma separated values on multiple buttons in input type text <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> $(‘.baths’).on(‘change’, function() { var vals = []; $(‘.baths:checked’).each(function(){ //could also use .map
Custom Taxonomy in WordPress for custom post type // Custom Taxonomay “Location” for custom post type “Books” add_action( ‘init’, ‘create_locations_nonhierarchical_taxonomy’, 0 ); function create_locations_nonhierarchical_taxonomy() {
Display custom notice in woocommerce Quick Solution: /* custom notices */ add_action(‘template_redirect’, ‘my_custom_message’); function my_custom_message() { //you can change role or page slug below if
Redirect product – page – role based with IF condition in wordpress through functions.php or a plugin Quick Solution: add_action( ‘wp’, ‘redirect_single_product_page’ ); function redirect_single_product_page()
How to use custom metabox in wordpress for post types? //change post type for the first time here function lets_add_custom_meta_box() { add_meta_box("my-custom-meta-box", "Additional Info", "my_custom_meta_box_markup",
Account
Site
Copyright © 2022 AmitpalSingh.com, doing business as Woocoders. All Rights Reserved.
Got a Question? Check out our FAQ Section.