Commenting feature is a great feature in WordPress but only while you use WordPress as a blog. But most of the site now days use WordPress as a CMS so they dont need commenting features in site. Today i am going to introduce you a new plugin to disable commenting feature in WordPress. Comment Disable plugin Details […]
How to get attached images from a page
Attached images in WordPress are handy while using with theme development. Using this code you can get attached images from a page. We are using this code inside a wordpress page templates and we will get its attached images via media option.
Show Meta Box if a specific page template is used (jQuery)
Using this code you can show WordPress meta box for a specific template selected. To do this add this code in to your themes function.php file <?php add_action( ‘admin_head-post.php’, ‘metabox_switcher’ ); add_action( ‘admin_head-post-new.php’, ‘metabox_switcher’ ); function metabox_switcher( $post ){ #Locate the ID of your metabox with Developer tools $metabox_selector_id = ‘about-banner-image-meta’; echo ‘ <style type=”text/css”> […]
How to Create a Shortcode to Display Custom Post Type
In this code snippet we are exploring how we can create a shortcode to display custom post type. With this code snippet we are utilising WordPress shortcode API. What is WordPress Shortcode API The API enables plugin developers to create special kinds of content (e.g. forms, content generators) that users can attach to certain pages […]
How to Hide a Specifc user from WordPress admin panel
In this code snippet i will give you a small tweak over WordPress admin area. Using the code you can hide a user from WordPress dashboard. Why its Needed? If you want add an admin user to your clients WordPress site. There many be a chance of them to delete your user account after you deliver […]
Language Based Page Display Using WPML Plugin
In this post are looking for language specific query in WordPress. WMP is the top multilingual plugin in WordPress. If you are developing a multi-language site and you want display content only for a specific language this code snippet will help you. <?php $query = new WP_Query( ‘page_id=’.icl_object_id(221,’page’,true) ); while ( $query->have_posts() ) : […]
How to create new Post Type in WordPres
You can created new Post Type in WordPress using the following code. Whats is Post Type: WordPress can hold and display many different types of content. A single item of such a content is generally called a post, although post is also a specific post type. Internally, all the post types are stored in the […]
How to change all URL’s of WordPress site using MYSQL
Using the following code you can change the URL of your WordPress site with the help of MYSQL command. You need to run this MYSQL query in your PHPMYADMIN or any other MYSQL manager. Please make sure you changed the old url and new url values as per your site urls. UPDATE wp_options […]
Top five WorPress Managed Hosting Platforms
If you are a web developer, then you know that the hosting part of the web development process is the most critical part. If you go wrong with you hosting, your site may be rendered unhelpful even when it has the best design. Your hosting platform determines the loading speed of your site, its efficiency […]
How to add a dynamic number Sequence to Contact Form 7 Plugin
Contact form 7 is most popular WordPress plugin to create from. Its very simple. Recently i have a request from a client he wants generate a random number in contact from subject. He want each mail generated from contact from have a ID numer, a kinda suport ticket number. So a client send a message […]