How to Create Relationships - P4 - Using Meta Box and Breakdance

How to Create Relationships - P4 - Using Meta Box and Breakdance

Continuing the series on creating a relationship between two objects on your website, we have just explored a different method, using Meta Box and Breakdance. In this practice, we’ll create a bi-directional relationship between Courses and Instructors post types and show them on both singular and archive pages.

Continue reading "How to Create Relationships - P4 - Using Meta Box and Breakdance"

Get Posts by Custom Fields in WordPress - Part 2

Get Posts by Custom Fields in WordPress - Part 2

In part 1 of this series, we learned about how to get posts by custom fields in WordPress with the WP_Query function. However, if we need to deal with databases, it’s better to find another faster, easier, and more convenient way. That method is joining wp_posts and wp_postmeta tables together, and then querying by SQL. In part 2 of the series “How to get posts by custom fields in WordPress”, we’ll use this way to add the advanced searching feature that allows users to search by keywords in posts / pages titles and custom fields content.

Continue reading "Get Posts by Custom Fields in WordPress - Part 2"