How to hide/remove some sections of advanced ads plugin for advertiser user?
-
I am using the Advanced Ads plugin for a couple of months and is working fine. As soon I installed this powerful plugin, I find it the most perfect and powerful solution for all of my core requirements.
Based on the fact that I have different users registered on my website i.e. Administrator, Advertisers, Subscribers, Customers, etc. Because I am using the Advanced Ads plugin for allowing Advertiser users to place their Ads on my website, so I need a bit of customization in the appearance of this plugin for Advertiser Users only.
I do not want Advertiser users to see the Display Conditions, Visitor Conditions, Layout/Output sections and Stop/Start Wizard button functionality. Because when they create a new Ad, these sections including the Start/Stop Wizard button confuse the user.
For this purpose, I need some way to configure the Start/Stop Wizard button such that when an Advertiser user clicks on the “Create New Ad” button, he always find the Wizard in start mode (not in stop mode). Because, when I configure the Start/Stop Wizard functionality like this, I will simply hide those target sections for Advertiser Users like the Display Conditions, Visitor Conditions, and Layout/Output sections so they won’t mess with them again. Currently, when advertiser clicks on the New Ad button and the Wizard on the next page appears either in Stop or Start mode. If he will change the Wizard appearance from Stop To Start and Vice Versa and then refresh the page (do not proceed with saving the ad) and clicks on the Create Ad button again, the Stop/Start Wizard functionality remains the same as he left that before refreshing the page.
I can resolve the rest of the stuff if only I get some way to change the default appearance behavior of the button i.e. The Wizard functionality always appears to be in Start mode (not in the stopped form so users do not need to click on the button saying Start Wizard).
For now, I have hidden a few Sub_Menu items of Advanced Ads Main Menu for Advertiser Users, However, Administrator still saw them on the Admin side like:
-Advanced Ads
-Groups & Rotation
-Placement
-Settings
-SupportI have used the following code for hiding these sub_menu items on the Admin side for Advertiser Users:
add_action( 'admin_init', 'my_remove_menu_pages' ); function my_remove_menu_pages() { global $user_ID; if ( current_user_can( 'advertiser' ) ) { remove_submenu_page( 'advanced-ads', 'advanced-ads' ); remove_submenu_page( 'advanced-ads', 'advanced-ads-groups' ); remove_submenu_page( 'advanced-ads', 'advanced-ads-placements' ); remove_submenu_page( 'advanced-ads', 'advanced-ads-settings' ); } }
- The topic ‘How to hide/remove some sections of advanced ads plugin for advertiser user?’ is closed to new replies.