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() );?>” />
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 […]
Get author name of blog posted in WordPress
How to each blog post Author name in Blog anywhere using PHP in WordPress <?php $author_id = $post->post_author; echo get_the_author_meta(‘display_name’, $author_id); ?>
MySql query for fetch/ retrieve category data in WordPress with image thumbnail
MySql query for fetch WP post_id, post_title, post_date & name with using thumbnail for a particular WordPress category. WordPress also provides some methods for retrieving post data with thumbnails but […]
Get Country Name and IP Address in Form Hidden Field by PHP Geoplugin API
Using GeoPlugin PHP API to Get Country Name and Country IP address. Some time in HTML contact or WordPress contact form 7 we need to Country and Country IP […]
Why should not use WordPress for your Busines Website
Why do need a WordPress Website for Small Business High Maintenace WordPress Websites require regular maintenance like PHP Version Updates, Theme Updates, Plug-in updates and etc. Update Plugin and […]
Text Replace By Define Simple Function in WordPress
Text replacement in WordPress By Define Simple Function In WordPress replace text by define function in function.php file. By this code allow to easily define text or HTML that replace […]
