Author Archives: LilianaGaete

How to check if a post has a term of a taxonomy

Often I find that I want to load a different template depending on what a term of a taxonomy a post has been given. It is a simple if has term check. This is the code:
Posted in Become a WordPress expert, Tutorials | Leave a comment

How to enable page excerpts in WordPress

For the first time today I wanted to add an excerpt to a WP page, and guess what? It was not supported by WP. But, luckily after a little bit of looking around I found this single line of PHP that makes it possible Just add this line of code to your functions.php file and [...]
Posted in Become a WordPress expert | Leave a comment

Good WordPress plugins: Query Multiple Taxonomies

From now on I’m going to have this new section called “Good WordPress Plugins” Really good WP plugins are sometimes hard to find. So I think it’d be cool to post about them as we find them. The winner for this week is: Query Multiple Taxonomies
Posted in Become a WordPress expert, Good WordPress Plugins | Leave a comment

How to get PHP working within a shortcode

Become a WordPress Expert: Tutorial 2 Shortcodes are very useful in WordPress. However, I never needed before to run some PHP within a shortcode. At first I thought it might not work, but then I realized it is actually quite easy. Just wrap your PHP code with curly brakets inside your shortcode. Easy!
Posted in Become a WordPress expert, Tutorials | Leave a comment

IE image scaling fix

It turns out IE doesn’t scale images correctly when you use CSS to do it. These images end up looking quite weird, actually. After researching this I found a small CSS snippet that fixes this: Of course, resizing images with CSS is not the ideal way, but there may be times where you need to. [...]
Posted in IE Fixes | Leave a comment

How to display the total search results and the search query in WP

Become a WordPress Expert: Tutorial 1 It’s really good for the user experience to tell them the total amount of posts found when they do a search. And displaying the word they search for is also very handy. I’ve found a few methods to do this, but they are all too complicated given that WordPress [...]
Posted in Become a WordPress expert, Tutorials | Tagged , | Leave a comment