Set Maximum Comment Length in WordPress

You can limit comment length in your WordPress site using following simple code snippet. We used the filter preprocess_comment to set the limit. preprocess_comment is a filter-hook that is applied to the comment data prior to any other processing of the comment's information when saving a comment...

Profile photo of Tauhid
Tauhid
November 4, 2015


READ MORE  

Limit Dashboard access in your WordPress site

If you run a site where user can sign-up but you don't want them to access wp-admin/dashboard area , then following simple code snippet will do the trick you want. Limiting Dashboard access in your WordPress is as simple as that. add_action( 'init', 'limit_dashboard_access'...

Profile photo of Shahriar
Shahriar
August 4, 2015


READ MORE  

Push footer to the bottom using jQuery

When your WordPress page or post contains a small amount of content, the footer can sometimes sit halfway up the page leaving a blank space underneath. This looks bad, especially on a large screen. So, if you want to push that footer to the bottom of page following tricks will be perfect for you. In...

Profile photo of WP Eden
WP Eden
January 30, 2015


READ MORE  

How to Get Post Thumbnail URL in WordPress

When you are working with WordPress theme or Plugin sometimes you may need to retrieve The Post Thumbnail URL.  Actually it is pretty easy. You simply need to use following code snippet to Get Post Thumbnail URL in WordPress: <?php $thumbnail_id = get_post_thumbnail_id(); $thumbnail_url = wp_get_attachment_image_src($thumbnail_id,'thumbnail-size',...

Profile photo of Tauhid
Tauhid
November 13, 2014


READ MORE  

Getting list all images of media gallery in your WordPress Site

Following code snippet will pull all images from WordPress media gallery: $query_images_args = array( 'post_type' => 'attachment', 'post_mime_type' =>'image', 'post_status' => 'inherit', 'posts_per_page'...

Profile photo of WP Eden
WP Eden
November 11, 2014


READ MORE  

Add custom post type with wordpress regular post RSS feed

By default WordPress only add standard Posts in RSS feed. So when you are using custom post type and creating posts there those will not be added in main RSS feed. But keeping posts in main RSS feed sometimes may increase your visitor and helpful for faster search engine indexing. Here we will show how...

Profile photo of Quick Design
Quick Design
April 30, 2014


READ MORE  

Change the Default Avatar / Gravatar Image in WordPress

WordPress has a default avatar for user. Which is known as Mystery Man. But you can Change the Default Avatar / Gravatar Image in WordPress. There could be few reasons: Mystery man is not so Mysterious, as many users define it as  "Boring" or "Annoying" You may want to brand...

Profile photo of WP Eden
WP Eden
April 11, 2014


READ MORE  

Get Next and Previous post url in WordPress

WordPress has built in function to show next/previous post link. If you want to get Next and Previous post urls, then copy following code snippet. It does just what you want. <?php $next_post_url = get_permalink( get_adjacent_post(false,'',false)->ID ); $previous_post_url = get_permalink(...

Exclude Specific Posts from Homepage Loop

If you want to filter your wordpress homepage loop and remove some specific posts, following tip will be helpful. It shows how to  exclude specific posts from homepage loop. From WordPress "pre_get_post" Action reference docs This hook is called after the query variable object is created,...

Profile photo of Shahriar
Shahriar
December 29, 2013


READ MORE  

Twitter Bootstrap DropDown on Hover and Activating Click Event on Parent Item

By default bootstrap drop down opens on click and parent item link don't work anymore as the parent item simply used for triggering drop-download. But the following js code will help you to open drop down on hover and also will activate the link with parent menu item. <script> jQuery(function($)...

Profile photo of WP Eden
WP Eden
July 5, 2013


READ MORE  

Set a minimum word count for wordpress posts

In this article, we will share with you a snippet that lets you set a minimum Word count for your WordPress posts. If a user tries to publish a post that is too small, then it will return an error telling them the post is not long enough. Open your theme’s functions.php file and paste the following...

Profile photo of mrs.shoma
mrs.shoma
December 12, 2012


READ MORE  

How to display Feedburner Subscriber Count as Text

Most designers use this trick to have custom styling and avoid the annoying feedburner button. Simply copy and paste this code anywhere you like most likely sidebar.php:  $whaturl="http://api.feedburner.com/awareness/1.0/GetFeedData?uri=your feedburner id"; $ch = curl_init(); curl_setopt($ch,...

Profile photo of mrs.shoma
mrs.shoma
December 12, 2012


READ MORE  
home