menus – Hide programmatically a page created by plugin

Question

I’m building a plugin that needs to create a custom Woo page that will show a specific shortcode to its content… The page is added fine, but it also appears at the top menu. I want to hide that entry programmatically, but no matter what filter (wp_page_menu_args, wp_list_pages_excludes, and a couple more) I hooked to, it doesn’t work. Basically I’m using the stock Twenty Twenty-Two theme, which doesn’t even support a menu customizer, but I want a universal solution anyway, that will hide the page from the frontend menu, no matter what type of theme the admin will be using in their website.

Any help will be much appreciated.

0
Faye D. 1 year 2022-06-23T16:58:49-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse