WP custom posts: filter results to custom taxonomy tag that corresponds to user meta field

You would not do this using SQL, and you don’t need to. Use PHP instead. For example, this code adds a search parameter to the query, but the value changes depending if the user is logged in: add_action( ‘elementor/query/article_video_together’, function( \WP_Query $query ) { $foo = is_user_logged_in(); if ( true === $foo ) { $query->set( … Read more

Order by title Child Pages displayed in a Parent Page

Take a look at the documentation of wp_list_pages(). You can use the argument sort_column to specify the ordering. Use sort_column=post_title to list the pages alphabetically. So your query for the child pages will become something like this: $childpages = wp_list_pages( ‘sort_column=post_title&title_li=&child_of=” . $post->post_parent . “&echo=0’ );