• First off, sorry if this is in the wrong thread. I wasn’t really sure where to put this one since it has to do with multiple topics.

    WordPress Info: 4.1 Multisite used for bilingual translations.
    Theme: WP-Forge (uses Foundation Framework)

    Now that that’s out of the way, for anyone who has used Foundation, you’ll know that the fixed navigation class does not play well with the WordPress admin toolbar.

    I came up with a quick fix by disabling the toolbar altogether with the show_admin_bar( false ); line in my functions.php file and a static navigation bar that includes its own admin dropdown menu with all the available links in the regular admin toolbar. This works fine and all, but I have no idea how to implement the admin section into the walker class of the WP-Forge theme. Specifically because of the user settings and php-only links.

    I browsed Google for a bit and came up with this plugin that solves my user roles issue, but I have yet to figure out how to use the php-only links within the confines of the WordPress menu creator. I have below a version of my custom admin menu so you guys can see what I’m talking about. Is anyone familiar with any way to use these php links in the menu creator, or am I out of luck?

    <?php if ( is_user_logged_in() ) : ?>
    
    <?php
    	global $current_user;
    	get_currentuserinfo();
    ?>
    <li class="has-dropdown">
    	<a href="#"><?php echo $current_user->user_firstname; ?></a>
    	<ul class="dropdown">
    		<li class="has-dropdown">
    			<a href="<?php echo get_edit_user_link( $current_user->ID ); ?>">Profile Options</a>
    			<ul class="dropdown">
    				<li><a href="<?php echo get_edit_user_link( $current_user->ID ); ?>">Edit Profile</a></li>
    				<li><a href="<?php echo wp_logout_url( $redirect ); ?>">Log Out</a></li>
    			</ul>
    		</li>
    
    		<?php if ( current_user_can('administrator') ) : ?>
    		<li class="has-dropdown">
    			<a href="<?php bloginfo('url'); ?>/wp-admin/"><?php bloginfo( 'name' ) ?></a>
    			<ul class="dropdown">
    				<li><a href="<?php bloginfo('url'); ?>/wp-admin/">Dashboard</a></li>
    				<li><a href="<?php bloginfo('url'); ?>/wp-admin/themes.php">Themes</a></li>
    				<li><a href="<?php bloginfo('url'); ?>/wp-admin/customize.php?url=<?php get_site_url(); ?>">Customize</a></li>
    			</ul>
    		</li>
    		<?php endif; ?>
    
    		<?php if ( current_user_can('administrator') || current_user_can('editor') ) : ?>
    		<?php edit_post_link('Edit Page', '<li>', '</li>'); ?>
    		<li><a href="<?php bloginfo('url'); ?>/wp-admin/edit-comments.php">Comments Awaiting Moderation</a></li>
    		<li class="has-dropdown">
    			<a href="#">Create New</a>
    			<ul class="dropdown">
    				<li><a href="<?php bloginfo('url'); ?>/wp-admin/post-new.php">Post</a></li>
    				<li><a href="<?php bloginfo('url'); ?>/wp-admin/media-new.php">Media</a></li>
    
    				<?php if ( current_user_can('administrator') ) : ?>
    				<li><a href="<?php bloginfo('url'); ?>/wp-admin/post-new.php?post_type=page">Page</a></li>
    				<li><a href="<?php bloginfo('url'); ?>/wp-admin/user-new.php">User</a></li>
    				<?php endif; ?>
    
    			</ul>
    		</li>
    		<?php endif; ?>
    
    		<?php if ( current_user_can('administrator') ) : ?>
    		<li class="has-dropdown">
    			<a href="https://www.www.ads-software.com">WordPress</a>
    			<ul class="dropdown">
    				<li><a href="https://codex.www.ads-software.com">Documentation</a></li>
    				<li><a href="https://www.www.ads-software.com/support/">Support Forums</a></li>
    				<li><a href="https://www.www.ads-software.com/support/forum/requests-and-feedback">Feedback</a></li>
    			</ul>
    		</li>
    		<?php endif; ?>
    
    	</ul>
    </li>
    
    <?php endif; ?>
Viewing 1 replies (of 1 total)
  • Thread Starter im_ryan

    (@im_ryan)

    I decided I wanted to update this post, but I do not have the option anymore. Ignore the OP and look here if you will:

    Is there any way to place this php code:
    <?php echo get_edit_user_link( $current_user->ID ); ?>
    or
    <?php echo wp_logout_url( $redirect ); ?>
    In the Menu editor in the WP Admin page? Or can I find it’s equivalent?

Viewing 1 replies (of 1 total)
  • The topic ‘Custom Admin Toolbar for Theme’ is closed to new replies.