Add a media button for custom meta box image for a page or post

hello fellos, As i have been searching for adding an image from wordpress media uploader to my page. It was really tough search to find a right solution with working script. Here is the script that worked for me. Just paste it on functions.php and do the required changes. /** * Create Area icon image …

Display related blog post by blog post category by making a function

Display related blog post by blog post category by making a function. which help you to put this as a related posts for a particular template. send $ppp as a post per page and $cat for category slug. function display_related_blog_posts($ppp,$cat) { global $post; $args = array( ‘posts_per_page’ => $ppp, ‘category_name’=> $cat ); $myposts = get_posts( …

Customize google map with colored multopointer

Here is the complete file I was working with Hope this will be helpful to understand the google map options. <section> <style> #map_wrapper { height: 400px; } #map_canvas { width: 100%; height: 100%; } </style> <div id=”map_wrapper”> <div id=”map_canvas” class=”mapping”></div> </div> <script> jQuery(function($) { // Asynchronously Load the map API var script = document.createElement(‘script’); script.src …

Defer iframe for your website to make your website loading fast

Defer iframe for your website to make your website loading fast. iframe source loading took some time and which blocks other scripts to load  as quickly as you can. We can defer the iframe so the other scripts can load quickly and our iframe will be loading after page scripts is fully loaded. This method …

Few important/handy wordpress functions you must know before starting wordpress

Hello This is about quick developing themes and this article is all about broblems with searching worpress functions while developing a theme from scratch. I am making a list of handy fuctions which are the most used and you should remember these in finger tips. Get a URL from slug name: <?php echo get_permalink( get_page_by_path( ‘contact’ …

Create a custom post type and its metaboxes

In WordPress everything is a post_type and anything you would like to attach with this post_type is possible by metaboxes. Posts are stored in the wp_post table and its meta information is stored in wp_postmeta table. This is a very basic structure which WordPress follows and every new collection is build around it. posts and …

Fix the CDN missing images for your SSL site

If you ever find such a problem that not all of you files get uploaded in CDN. You know you can migrate images but it takes some time there is not a full surety that all images will be uploaded to CDN. So If you put a CDN link like db79e2070b0c95965a69-f4ee703189c46af6fe45f026a70dab33.ssl.cf2.rackcdn.com will not found missing …

Customize your upload button

Customize your upload button with a few codes here Here the html <div class=”fileUpload”> <input id=”uploadedimage” class=”uploadedimage” name=”profile_image” type=”file”> </div> Following by css .fileUpload { background-image: url(http://www.sgkidsco.com/wp-content/themes/zolix/img/upload-button.png) !important; height: 40px; background-repeat: no-repeat; color: rgba(255, 255, 255, 0); } input.uploadedimage { opacity:0; width:100%; height:40px; }   You can the preview at jsfiddle http://jsfiddle.net/shakalya/usrphx5y/