Multiple plugins settings of same developer into ONE settings page linked together
Multiple plugins settings of same developer into ONE settings page linked together
Multiple plugins settings of same developer into ONE settings page linked together
My submenu page does not show for users with the capability provided while adding the submenu page
The method to use is… In the acf_add_options_sub_page declaration, add ‘post_id’ => ‘article’ as a parameter. (post_id) This is how the field data, as entered on the Options page corresponding to my post type, will be saved. On the display end, display using $featured_posts = get_field(‘featured_posts’, ‘article’); ‘article’ and ‘report’ are both used. In my … Read more
Concerning your question: Can my theme be submitted for approval with these errors? I’m assuming you’re asking whether your plugin, while throwing an error upon activation using TGM library, can still be submitted and accepted to official WordPress repository. My answer would be, no, it cannot. It seems like you made your plugin work once … Read more
You’re recieving this error because WordPress notices the post_type query argument and that sampletype is a valid registered post type, and thinks you’re on an edit page. Try using a different query arg then post_type. Note that admin.php?page=plugin-slug-posttypes-add&post_type=thisisnotaposttype and admin.php?page=plugin-slug-posttypes-add&foo=bar will both work fine.
There is no right answer to this. You need to use the capability or capabilities that allow the users you want to have access to have access and prevent the users you don’t want to have access from having access. I would tend to create a capability and/or role in this kind of circumstance, but … Read more
Meta key or meta value in query parameter doesn’t automatically filter the query by default. So you have to filter the query to restrict results. add_filter(‘pre_get_posts’, ‘restrict_events_by_meta’); function restrict_events_by_meta($q){ if( $q->is_main_query() && is_admin() && ‘event’ == $q->get(‘post_type’) && isset( $_GET[‘meta_key’]) && isset( $_GET[‘meta_value’]) ){ $q->set(‘meta_key’, $_GET[‘meta_key’] ); $q->set(‘meta_value’, $_GET[‘meta_value’] ); $q->set(‘orderby’, ‘meta_key’ ); } }
I’ve managed to solve this using Javascript to ‘open’ the menu item when on the edit tags page in the plugin. Relevant plugin PHP file $screen = get_current_screen(); // Check we’re only on the edit-tags page in the plugin if (‘edit-tags’ === $screen->base && ‘subscriber’ === $screen->post_type) { wp_enqueue_script( $this->plugin_slug . ‘-subscriber-edit-tags-script’, plugins_url(‘assets/js/subscriber-edit-tags.js’, __FILE__ ), … Read more
It seems that you are adding the menu levels as separate menus: A “Primary menu” containing the items: “HOME”, “DPRK TOURS”, “INTERNATIONAL”, … etc. A “Secondary menu” containing the items: “INTERNATIONAL GROUP TOURS”, “VOLUNTEER PROGRAMS”, … etc. However, most themes support at most two such menu-levels, and some even support only one. So, if you … Read more
You need to check that you aren’t already on the mobile site: function redirecting_to_mobile_site() { if ( $_SERVER[‘SERVER_NAME’] !== ‘m.example.com’ && wp_is_mobile() ) { wp_redirect( ‘http://m.example.com’ . $_SERVER[‘REQUEST_URI’], 301 ); exit; } } add_action( ‘template_redirect’, ‘redirecting_to_mobile_site’ ); You’ll need to clear your browser cache to properly test the fix.