I have not seen this documented anywhere other than this thread I found on the WordPress Stackexchange: http://wordpress.stackexchange.com/questions/107471/how-to-use-tax-query-to-apply-both-terms-or-one-if-one-is-empty?codekitCB=403616342.846423 The following is my implementation of it on the NN Occ Health Job Matrix theme in the file ‘content/.php: ($body_demand_one, $body_demand_two are variables set from query parameters passed from the url.)
Filter Duplicate Posts in the Loop
As seen on the great WP Engineer website: http://wpengineer.com/1719/filter-duplicate-posts-in-the-loop/?codekitCB=400689137.981452 As the question arises quite often I’d like to show how I make sure that the content presented, which were output in a loop, not showed up again in a second loop. WordPress identifies posts and pages via ID, which are created in the database and who Full Article…
Using FlexNav with WordPress
I thought it beneficial to note this support page on integrating the great Flex Nav script with WordPress. You don’t need a custom walker function. You can alter wp_nav_menu like this: and proper script init should be:
WordPress 404 email alerts
As seen on WP Mix: http://wp-mix.com/wordpress-404-email-alerts/ Here is a customized plug-n-play PHP script for reporting 404 errors via email. No editing required, just clean email alerts for each 404 error. To implement, simply include this script at the top of your theme’s 404.php file: No editing required, just include and done. To disable the email reporting, either remove the script Full Article…
Create your own conditional tag in WordPress
As teaken from: WP Ninjas. Have you ever wanted to do something based on a specific set of conditions. Sure you have and you’ve probably used the WordPress Conditional Tags at least once or twice. Conditional Tags are extremely useful functions that check a set of conditions for you. They work like this… The is_single function returns Full Article…
How To Get the URL of the page you are on with PHP
Wisdom taken from here: http://wordpress.org/support/topic/how-to-get-the-url-of-the-page-you-are-on-with-php If you are in the WordPress loop: Yes it will work for lists of posts, providing they use a regular loop.. the_permalink() is a loop function, it’s made for use “in the loop”. If you have a non-standard loop, you can just as easily use… echo get_permalink($ID); where $ID is a variable where Full Article…