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( […]