Archive widget: limit the number of months to 12

If you want to limit the number of months to only 12 for your Archive widget in your theme sidebar, use the widget_archives_args filter to add the archives limit.

Insert the following code into the functions.php file of your theme.

function my_limit_archives( $args ) {
    $args['limit'] = 12;
    return $args;
}
add_filter( 'widget_archives_args', 'my_limit_archives' );

And to limit the number of months in Archives widget drop-down, use the following drop-down filter by replacing the last line of the above code.

add_filter( 'widget_archives_dropdown_args', 'my_limit_archives' );

We hope this helps!

Limit the number of tags in your WordPress tag cloud widget

If your WordPress-powered site has a lot of tags (and growing), you will probably be struggling with a messy-looking list inside the tag cloud widget. But you would rather show a decent number of tags instead of removing the widget altogether, right?

Place the following code in your theme’s functions.php file which should resolve this issue.

//Register tag cloud filter callback
add_filter('widget_tag_cloud_args', 'tag_widget_limit');

//Limit number of tags inside widget
function tag_widget_limit($args){

 //Check if taxonomy option inside widget is set to tags
 if(isset($args['taxonomy']) && $args['taxonomy'] == 'post_tag'){
  $args['number'] = 10; //Limit number of tags
 }

 return $args;
}

Let us know whether this works out for you just fine!

Hosting options for WordPress hosting

Hosting a website is extremely important, yet is often overlooked when the initial plans for the website are being considered. If the website is being done in WordPress, then the best hosting service to use is one that specializes in WordPress hosting. There are several different types of web hosts — shared, free, dedicated, VPS, and managed hosting. When someone is a beginner and just starting their website, choosing the wrong hosting service can be hard to turn around later.

As known to all, WordPress is a content management system and is the most popular system used to build websites used today. That being said, it does have some requirements for hosting and most major web hosts have installers that automatically will install WordPress on any website Continue reading

Page 1 of 12123456789101112