Admin bar and fixed header issue?

I've styled my header to have a fixed top position. While logged in to wordpress, the wp admin nav bar covers the top section of my header making imposible to access my top navigation. I would like for the wp admin nav to push my top navigation below so both are visible. Does anyone know of any solution to fix this problem? An example of my problem can be found at... www.nickriversdesign.com/dev
Category: Web

Admin toolbar not displaying on pages

The admin bar displays on the dashboard, but does not display on pages or posts. I'm working with a child theme of Twenty Thirteen that I did not code. I'm a beginning level coder and work mostly with builders. So the builder plugin I installed is also not showing up either. I've read some potential causes and checked those off. There are things I've tried that did not correct the problem: The display is set correctly in the user settings. …
Category: Web

After changing wp from subdirectory to root I can't preview any changes to a page or post

I followed the guideline from WP Codex. Changed the site url in general settings Copied the .haccess and the index.php files from the subdirectory to the root Edited the root index.php (new copied file in root) from: '/wp-blog-header.php' ); to '/subdirectory/wp-blog-header.php' ); checked the permalink structure. the following code is in the new copied root .haccess file # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] …
Category: Web

How to display admin bar when using WP_USE_THEMES = false?

So I'm using WordPress in a 'themeless' manner, i.e. not using a "blog" template. My site files are in the root directory (not in the theme folder), and WordPressis installed in its own /wordpress/ directory. The only thing my theme exists for is customization of the back-end, including re-branding and custom post types. (I'm basically avoiding plug-ins and widgets and doing a bespoke implementation of WordPress) With this set-up, is there a way I can get the admin bar to …
Category: Web

custom filtering admin columns

i'm trying to add custom filters to a CPT job-offer, for example, i'm starting by locations. the filters works fine except when i try to filter by all locations. this is my code function add_custom_filter_tablenav($post_type){ global $wpdb; /** Ensure this is the correct Post Type*/ if($post_type !== 'job-offer') return; /** Grab the results from the DB */ $query = $wpdb->prepare(' SELECT DISTINCT pm.meta_value FROM %1$s pm LEFT JOIN %2$s p ON p.ID = pm.post_id WHERE pm.meta_key = "%3$s" AND p.post_status …
Category: Web

Show admin bar only for some USERS roles

I have 4 users roles on my wordpress platform (role1, role2, role3, role4) I'm looking for to show front-end top bar only for Role1 Role2. how can i add a condition on this code to show it only for this 2 roles? function wpc_show_admin_bar() { return true; } add_filter('show_admin_bar' , 'wpc_show_admin_bar'); thanks
Category: Web

How do I add an icon to a new admin bar item?

I have a function that adds items to the WordPress toolbar. For example: $args2 = array( 'id' => 'conversations_unread', 'title' => $visitor['conversations_unread'] . ' &nbsp ', 'href' => XenForo_Application::get('options')->boardUrl . '/conversations' ); How do I get an icon to the left of this new item? I've tried to use the 'meta' but the icon doesn't show. 'meta' => array( 'class' => 'ib-icon' ), I read a reference to adding the image to the 'title' but I'd like this icon to …
Category: Web

Different Admin language

We are running our WP site in Hungarian but nobody in our team understands this language. We successfully changed admin backend language to our native language but not everything changed. We are still getting notification emails in Hungarian. The top (black) admin bar is also in Hungarian. Woocommerce send orders in Hungarian to admin... Is there a way to change that?
Category: Web

Remove admin bar for subscribers

I have a membership site. I need to disable the admin bar for the subscribers. I have used this code below: add_action('after_setup_theme', 'remove_admin_bar'); function remove_admin_bar() { if (!current_user_can('administrator') && !is_admin()) { show_admin_bar(false); } } which removes the admin bar from the frontend for the subscriber, but when they go to their profile page wp-admin/profile.php, the admin bar is still showing there. I am using Paid Membership Pro plugin which I think made the code not working on the backend for …
Category: Web

Creating an admin button that when clicked shows a popup form

I am creating a custom plugin to add a button to the buttons panel when editing a post or page in the classic editor. I have no trouble adding a button to the panel, but am unsure of the best way to create a popup form allowing a user to input a value to later be added to the text being edited as a name attribute or tag when this button is clicked. I would like to use pure JS …
Category: Web

Removing admin bar from wordpress dashboard

I'm using wordpress multiste 3.3.1 I'm not gonna update it in the future. So I disabled all upgrade functions. I want to remove the wordpress admin bar from both frontend as well as dashboard. I can remove it from frontend using this code. add_action( 'init', 'disable_admin_bar', 1 ); function disable_admin_bar() { add_filter( 'show_admin_bar', '__return_false' ); } But i couldn't find any solution to remove it from dashboard. I don't want to use css solution to hide admin bar and I'm …
Category: Web

Remove top admin bar

whenever admin or any other user logs in a top bar menu ads up. Now I made login for everybody, so I do not want this bar. First I added display:none to admin-bar.css, but the main problem is that wordpress is still adding a white line on the top with: html { margin-top: 28px !important; } How to remove this as this is causing some design flaws.
Category: Web

Top admin tool bar not displaying for "Editor" user role

To handle user role permissions - I decided that not all of 50 users should have Administrative roles - Most of our user are "Editors" and so I switched them from an Administrative role to Editor. Problem now is that the Editor users don't have access to the top tool bar. (They had access to it when they are an Administrator role). What I tried so far I made sure that " Show Toolbar when viewing site " has been …
Category: Web

Where is admin bar supposed to appear?

Where in the page's HTML is the admin bar supposed to appear? On my blog it is added to the footer section, with the result being that there is a gap above it when viewing the blog on mobile phones. (The admin bar has position:absolute; at small resolutions, and so does the footer it's contained within.)
Category: Web

How can I specify the position of an admin bar item added with $wp_admin_bar->add_menu() or add_node()?

I want to add a link to my site in the admin bar, and make that link the leftmost item in the admin bar. I can add a link with this in a plugin function: $wp_admin_bar->add_menu( array( 'id' => 'my-link', 'title' => __('MySite'), 'href' => site_url() ) ); But I'd like to make it the leftmost link in the admin bar, i.e. all the way in the top left corner. Is there a way to do this?
Category: Web

WordPress Admin bar missing from custom theme

I'm working on a WP site which has a custom theme built from scratch and I can't seem to figure out how to get the Admin Bar to appear when viewing the public site. The themes footer.php file has the wp footer code in it: <?php wp_footer(); ?> just before the closing </body> tag. I've tried disabling all plugins and reverting back to default theme. The Admin bar appears when using the Twenty Twenty One theme so the issue is …
Category: Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.