Categories
CMS Mastering Development Wordpress

Get get Current Page ID in functions php, meta query filter

How do I get the Current Page ID in functions php when creating an meta query filter? I’ve made many attempts but all return Null. The filter works as expected when I manually input a number, but I need it to automatically echo the current post ID. Any guidance is appreciated, thanks. $args = array( […]

Categories
CMS Development Wordpress

Filter posts by their related field’s custom field

I have two post types named ‘programs’ and ‘universities’, where the programs are connected to their respective universities. I want to filter programs by university’s custom fields such as ranking or location. I can filter and display the programs by their own custom fields using WP_Query. However, I cannot filter them by their related post’s […]