What does $temp do?

What any variables used in samples do depends entirely on that specific sample. If a sample assigns a query to a variable called $temp, then that’s what $temp does. It doesn’t mean anything else, it’s just what’s shown in the sample. Guide and tutorial writers can and will create and use any variables they want. … Read more

how to move a page from one drop down menu to another drop down menu

If it’s defined in a custom menu in your theme, then Find the menu settings and drag it from where it is to where you want it to be, or remove from the one menu add to the other. https://www.wpupgrader.com/wordpress/change-menu-navigation-settings/ https://codex.wordpress.org/WordPress_Menu_User_Guide#Customizing_Menu_Items. If it’s a custom menu, just the default page hierarchy then edit the page … Read more

How can I use WP_Query to sort ‘event’ custom post type by date?

Found a ready made solution posted in the codex: https://developer.wordpress.org/reference/hooks/pre_get_posts/ The trick here is the pre_get_posts hook which modifies the query variable ‘after the query variable object is created, but before the actual query is run’ so that if the post type is an event, it sorts in the same way I’d been doing already. … Read more