Articles of comparison

What are the advantages of WordPress over other systems?

I’ve tried to explain the benefits of WordPress to others; comparing it to static sites is easy, as (most) everything can be done online with WP. I have more difficulty comparing and contrasting with other content management systems such as Drupal. I realize that there is no perfect system for every use, but what features […]

Check to see if page exists problems

I’ve created a class to dynamically create pages. I’m checking to see if the page exists by comparing the new page’s title to post_name. The comparison seems to work ok, but even if there is a match the page is created anyway and I can’t figure out why. My code looks like this: class createDynamicPage […]

get_transient(), PHP switch(), and comparison operators

Im using a WordPress transient, which expires after an hour, to store a value which is an integer. Im trying to use switch() and multiple case() statements to evaluate if the transient exists or not (i.e true or false). Here are my questions: Which comparison operator (=, ==, ===), in example 2, is ideal for […]

How to handle optional end date in compare clause in meta_query

I have a custom post type event in WordPress, and I need to query upcoming event posts comparing $current_date. Query conditions are : start_date is a valid date always end_date can be a valid date or null or empty string. IF end_date is a valid date in db record then compare end_date >= $current_date ELSE […]

What is the difference between get_page_link and get_permalink functions?

Both functions return permalink to the post or page by it’s ID. What are the differences and which of these functions should I use in which cases?