Category

Code Snippets

Category

This small Code Snippets is for those who works in WordPress blog with a picture and at all times wants to put one on his post. It can do the setting automatically. Mean, you can Set Featured Image Automatically with PHP Snippets. Using featured images in WordPress is easy and comparatively simple to set up even if theme doesn’t support the feature from score. If you think that option isn’t suit you then you can contrivance…

This Snippet is supposed to add in single.php, index.php or any other template within the loop. Don’t you think it would be finest thing to display on post where you can show post like “1 hour ago, 2 hour ago, 1 day ago” etc. echo human_time_diff( get_the_time(‘U’), current_time(‘timestamp’) ) . ‘ ago’; via Codex , Thumbnail image via inspirationde

In this post, you’ll came to know that how to create short code for custom post type with WordPress custom plugin. Custom plugin has been created to display custom post type by adding short code just before individual page. Custom post type for FAQ with name webr_faq can also be created. You just need to add the shortcode [rep posttype=’webrfaq’] in your page and replace it with custom post type name. Reference Source

Do you want to show or hide widgets on specific pages in WordPress? You can do this now. In this post we’ll let you know that how to show or hide widgets on specific pages without plugin. Now you can show or hide widgets on specific pages without using any plugin. This is tiny snippet which is added by Joel Worsham. Firstly you just need to have the ID name of widget which you want…

In WordPress theme, sometime you need to execute custom PHP code in widget to showcase the different information related to your category. Many plugins are available that do this, to add a new type of widget usually called PHP widget. But here you don’t need to install a plugin as it can be done by adding in functions.php file of your theme and these lines will turn by default text widget into a PHP enabled…

Many WordPress blog users forget to add featured image in their blog post while publishing their posts. If they remain forgetting to add the featured images, it would be time-consuming to re-edit those blog posts for assigning featured images. This  Snippet will help you to have all those posts that required featured image before they publish. You just need to add this snippet to the functions.php of your WordPress theme. When you try to publish…

Starting a new series about code Snippets, In this series we share some useful code snippets of HTML, HTML5, CSS, CSS3, PHP, Javascript and jQuery snippets. We hope that these snippets will worthwhile for our readers and should help in your projects.

Today we share a PHP Code Snippets “Check valid email address”.

CSS Media queries are an outstanding way to provide distinctive styles to different devices that’s the most excellent experience for every user. A part of the CSS3 specification as the role of the media attribute has been extended by CSS media queries which helps to let you know that how to control the style you applied.