Monthly Archives

March 2016

wordpress-tags-cloud-widget-limit

How to show limit number of Tags Displayed by WordPress tags cloud

By | Widget | No Comments

The Tag Cloud widget is a useful widget which displays a cloud of your most used tags on the sidebar or other areas that support widgets on websites powered by WordPress. But when the number of tags used grows, the list output by Tag Cloud widget may simply become too long or too short to your liking.

The default Tag Cloud widget does not support limiting or increasing the tags count.

Unfortunately, Tag Cloud widget does not provide any way to customize or set the number of tags to show in the output. To control the number of tags displayed by Tag Cloud widget, insert the following code snippet in your active theme’sfunctions.php custom functions file.

[[code]]czozMDY6XCINCmFkZF9maWx0ZXIoIFwnd2lkZ2V0X3RhZ19jbG91ZF9hcmdzXCcsIFwndGpfdGFnX2Nsb3VkX2xpbWl0XCcgKTsNCmZ1bmN0e1smKiZdfWlvbiB0al90YWdfY2xvdWRfbGltaXQoJGFyZ3MpeyANCgkvLyBDaGVjayBpZiB0YXhvbm9teSBvcHRpb24gb2YgdGhlIHdpZGdldCB7WyYqJl19aXMgc2V0IHRvIHRhZ3MNCglpZiAoIGlzc2V0KCRhcmdzW1wndGF4b25vbXlcJ10pICYmICRhcmdzW1wndGF4b25vbXlcJ10gPT0gXCdwb3N0e1smKiZdfV90YWdcJyApew0KCQkkYXJnc1tcJ251bWJlclwnXSA9IDIwOyAvLyBOdW1iZXIgb2YgdGFncyB0byBzaG93DQogCX0NCglyZXR1cm4gJGF7WyYqJl19cmdzOw0KfQ0KXCI7e1smKiZdfQ==[[/code]]
 

Replace the number of tags to display with your own desired count. Example above shows 25 tags. By default, WordPress limits the terms shown to 45 most used tags. You can increase (add) or decrease (reduce) the number of tags shown as you like.

On the other hand, if you use custom taxonomies and want to display those instead, replace the post_tag (the default WordPress taxonomy for tags) in the above code with the custom taxonomy term.

Pods – Get Custom Value Content Types and Fields in Category

By | Plugins | No Comments

Popular using Pods plugin to customize field in back-end of wordpress

https://wordpress.org/plugins/pods/

When I add custom field (example Position) in Category. How do I query Posistion value ?

 

get-post-meta-in-category

 

 

Creat function getTermMeta in file functions.php your theme

function GetTermMeta()

[[code]]czoxODg6XCINCg0KCWdsb2JhbCAkd3BkYjsNCgkvLyAkdGVybV9pZCA9IGNhdGVnb3J5X2lkDQoJJHNxbCA9IFwiIFNFTEVDVCBtZXRhe1smKiZdfV92YWx1ZSBGUk9NIHdwX3Rlcm1tZXRhIFdIRVJFIHRlcm1faWQgPSAkdGVybV9pZCBBTkQgbWV0YV9rZXkgPSBcJ3Bvc19jYXRcJyBcIjt7WyYqJl19CQ0KCXJldHVybiAkd3BkYi0mZ3Q7Z2V0X3Zhcigkc3FsKTsNCi4uLi4NClwiO3tbJiomXX0=[[/code]]

nhantam
Freelancer WordPress developer in Vietnam

6 Things Google Analytics Can Tell You About Your WordPress Website

By | Tutorial | No Comments

Today, we’re going to be talking website metrics in detail. Not the most glamorous topic, I know, but certainly one of the most important for any aspiring webmaster. More specifically, I’m going to discuss six things WordPress users can learn about their website from Google Analytics.

1. Your Website’s Demographics

When it comes to producing great content, it pays to create an audience profile. For example, your audience might be (primarily):

  • 30-40 years old
  • Male
  • US based
  • Decent disposable income
  • Interest in fast cars

With this broad set of characteristics in mind, you can create a persona for your average reader — a persona you can keep in mind as you write.

Read More

WordPress Exclude Categories from Recent Posts Widget

By | Widget | No Comments

Today I had to find a way to exclude posts from certain categories from showing up in the recent posts widget. I did a search and I stumbled across this discussion in the WordPress Forums.

I have found that pretty much everything you need with WordPress has been discussed and solved somewhere out in the Interwebs. Thankfully lawless shared his solution to this need. By adding the following code to your functions.php file, you can exclude categories by adding the category ID to the new Exclude Category(s) field.You can copy his code below and paste it into your functions.php file. I also packaged it up as a plugin which you can download and install manually. I will work on adding it to the WordPress repository shortly.

 

exclude-category-recent-posts

 

nhantam
VLandingPage

Freelancer Wordpess Developer Team