Require for Create Gutenberg Block with NPX (Node) Code editor Node.js development tools Local WordPress environment Firstly, go to your WordPress plugin directory, and then open it on the terminal […]
Basic Function: Get Template Output as String
WordPress function that loads a template file and returns the output as a string. function get_card_layout(){ ob_start(); include_once plugin_dir_path(__FILE__). “tempalte/cards.php”; $layout = ob_get_content(); ob_end_clean(); echo $layout; }
Get Image Path in WP Query Loop
Get Image Path in WP Query Loop $image = wp_get_attachement_images_src( get_post_thubnail_id(get_the_ID()), ‘thumbnail’ ); <img src”<?php echo $image[0]; ?>” alt=”<?php echo wp_get_atttachment_caption( get_the_ID() );?>” />
How to Dynamically Update the HTML Lang Attribute in WordPress Using functions.php
WordPress and dynamically update the <html lang=””> attribute for English and French pages by editing your functions.php file. function swigroup_custom_language_attributes( $output ) { // Get the current URL $url_path […]
Create a Taxonomies in Custom Post Type (CPT Plugin) and fetch category post results
Below is the code for fetch a particular CPT with created category/ Taxonomies with PHP WP_Query function.
Creating WordPress PHP Fetch Result to Custom Templates with CPT (Custom Post Type UI Plugin)
Add CPT plugin in your WordPress, then after create a Post type with plugin after create post type its appear in left side WordPress menu. Create Custom post type with […]
Gravity Form Submission with Zoho Lead Integration Or Form Data push to Zoho CRM
Gravity form predefined function gform_after_submission is executed at the end of form submission process when user submit the form.Gravity form gform_after_submission function contact entry object parameter contains all submitted values […]
How to change any WordPress blog inner content link href by PHP code
WordPress Blog Inner Content Href Link change or update with PHP. Firstly, go to includes directory in the WordPress theme folder below path ../blog/wp-content/themes/enfold/includes in includes folder find loop-index.php Find […]
Send Object data and variable data with FormData objects using Ajax-requests in jQuery
Send additional parameter as object and variable with form data with ajax using jQuery. JavaScript / Ajax Code FormData object is an iterable structure that resembles an array and contains […]
Code Implement JavaScript Async/Await
Implement JavaScript Async/Await Async keyword before a function return a promise and await keyword used inside async function. Await pause the execution and wait fo promise response result. async function […]
