Declaration of mandoe_menu_walker::start_el(&$output, $item, $depth, $args) must be compatible with Walker::start_el(…)

An entirely different approach. nav menu item are stored in posts table, so you can technically attach a post_meta into it, even other data like nav item class already stored in post mata table. However this wasn’t easy to do before. but after 5.4.0 release, they have implemented hooks to easily do this. Here’s the … Read more

Pre_get_post on CPT archive page

pre_get_posts filters run before WordPress has figured out the main query, which is used to pick the template. For this reason you can’t put it inside the template, it has to run before the template is picked, not afterwards. For this reason, it has to go inside your themes function.php or in a plugin

Check if plugin is being disabled

Sure, there are activation and deactivation hooks. See: https://developer.wordpress.org/plugins/plugin-basics/activation-deactivation-hooks/ <?php register_deactivation_hook( __FILE__, ‘wpse_deactivate_myplugin’ ); function wpse_deactivate_myplugin() { // Delete the file and do any other cleanup needed here. }

Get access to all terms associated to each post that the wp_query loop displays

If I understood you correctly, you are looking for get_the_terms(), which.. Retrieves the terms of the taxonomy that are attached to the post. You could for example have helper functions like these, // functions.php function my_sports_post_terms( int $post_id ) : array { $taxonomies = [‘basketball’, ‘volleyball’, ‘baseball’]; $terms = []; foreach ($taxonomies as $taxonomy) { … Read more