Jump to content
basmati

Remove Pagelines Button From Top Admin Bar

Recommended Posts

basmati    4
basmati

how can i remove the PageLines Button from the top admin bar in the backend?

Share this post


Link to post
Share on other sites
basmati    4
basmati

Can you please take a screenshot and point out which one you're referring to?

Usually i have a plugin for admin menu but i just can't get rid of that item.

#wp-admin-bar-pl_settings {

display: none;

}

that did not work!

post-9549-0-57605900-1351272430_thumb.pn

Share this post


Link to post
Share on other sites
basmati    4
basmati

thanks catrina, but that changes nothing - strange :(

Share this post


Link to post
Share on other sites
catrina    103
catrina

What is your reason for wanting to remove that link from the admin bar? (To prevent access?)


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
basmati    4
basmati

yes, preventing access for people without any knowledge.

i use a plugin user access manager - but this works only on the left side of the wordpress admin, not on the top quicklinks wordpress admin menu.

now access to pagelines via quicklinks is not possible though, but the menu still appears.

once there was a working function for PlatformPro ....

Share this post


Link to post
Share on other sites
catrina    103
catrina

I would advise continuing working with the CSS (the selector may need to be more specific). For example:

#wpadminbar li#wp-admin-bar-pl_settings li.menupop {display: none;}[/CODE]


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
basmati    4
basmati

have to finish for today, i'll try that later ... thanks so far!

Share this post


Link to post
Share on other sites
basmati    4
basmati

new idea:

in wp its easy to use a function for the admin bar items:


// since wp33 customize new admin bar	

function customize_admin_bar() {

global $wp_admin_bar;

if ( !is_admin_bar_showing() ) {

return;

}

$wp_admin_bar->remove_menu('wp-logo');

$wp_admin_bar->remove_menu('comments');

$wp_admin_bar->remove_menu('appearance');

$wp_admin_bar->remove_menu('view-site');

$wp_admin_bar->remove_menu('new-content');

$wp_admin_bar->remove_menu('settings');

}

add_action(

'wp_before_admin_bar_render',

'customize_admin_bar'

);

is there a way to remove pagelines item?

Share this post


Link to post
Share on other sites
James B    436
James B

I've just used this in my test site and it's hidden the button, do you have any caching plugins which could be preventing the changes showing instantly? Screenshot - http://screencast.com/t/ZYN4THm1M


#wp-admin-bar-pl_settings {display:none;}

or try

#wp-admin-bar-pl_settings {display:none !important;}


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

Hi,

Add this to your functions.php file in either your child theme or PageLines Customisation plugin.


add_action( 'wp_before_admin_bar_render', 'pl_admin_bar' );

function pl_admin_bar() {
global $wp_admin_bar;
$wp_admin_bar->remove_menu('pl_settings'); // Removes the PageLines menu
$wp_admin_bar->remove_menu('template_type'); // Removes the Template name menu
}[/CODE]

  • Like 1

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Simon    247
Simon

The menus are only visible to users with the edit_theme_options role. Unless all your visiters are Administrators?

Share this post


Link to post
Share on other sites
basmati    4
basmati

@james b: that was the first thing i tried. but i found no way - the css display none is not working - flushed the cache and everything. display none works in firebug but not within the child theme css.

 

@simon: it's visible for editors - but when they click on it they would have no access to the settings tab and thats confusing for clients.

 

@danny thanks - thats it!

 

solved!

Share this post


Link to post
Share on other sites
basmati    4
basmati

ok - must have confused my own admin modifications... :abe:

Share this post


Link to post
Share on other sites
dario+    20
dario
function remove_admin_bar_links() {
    global $wp_admin_bar;
	$wp_admin_bar->remove_menu('pl_settings');
	$wp_admin_bar->remove_menu('template_type');
}
add_action( 'wp_before_admin_bar_render', 'remove_admin_bar_links' );

This works great, but what about the Admin Menu bar > Edit Meta menu item, which leads here:

website/wp-admin/admin.php?page=pagelines_special#blog_page

 

None of the following work:

$wp_admin_bar->remove_menu('edit_meta');

$wp_admin_bar->remove_menu('pl_meta');

$wp_admin_bar->remove_menu('pl_edit_meta');

 

On a side note, how does one go about finding the menu item names (slugs?) to add into code such as this?

I know how to find the slug for a post or page but not Admin menu or Dashboard menu items.

 

Firebug, Chrome Dev nor Safari Dev seems to show them.

Share this post


Link to post
Share on other sites
greenfly    230
greenfly

Hello Dario 

 

Please could you create your own topic for this as this topic has been answered 


The answer to many issues can be found by searching in the forum before posting as someone else  may very well have had the same problem before you have.  Also, reading the documentation can help you gain a good understanding of how everything works. 

 

Please do not send me private messages. Occam's razor - The principle states "Keep things simple!"

Share this post


Link to post
Share on other sites
dario+    20
dario

No problem Martin.

Would you like to remove my question from this topic?

 

Regardless, I answered both of my questions on my own so I guess there's no need to repost.

Share this post


Link to post
Share on other sites
James B    436
James B

Excellent, thanks for following up :-)


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites
dario+    20
dario

For various reasons Adminmize did not do what I need in this case. I'm also using the Members plugin and due to some rights I need to give a few users I can't disallow certain things with the plugins.

 

Regardless, here's the code I was looking for:

$wp_admin_bar->remove_menu('special_settings');

Also, viewing the source of the rendered page shows the Admin Bar items and that's how I found 'special_settings'.

  • Like 1

Share this post


Link to post
Share on other sites
basmati    4
basmati

thank you!

thats a big point - concerning wordpress user management - with a lot of work to do in further development.

until that we have to stick to functions and plugins...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×