How can i customize Top Menu Logo Link after logging in?

Posted in: Newspaper
Post count: 74

I want to know how can i add stuff like Dashboard, add post after a user login to my website. Here is the picture that explains better.

http://awesomescreenshot.com/0823d0d2bf

Post count: 74

Can anybody please reply. I actually wants to setup a drop down menu on USERNAME(in the top menu) when somebody login to my site.

Post count: 9544

No idea. Not part of theme. Likely you will want to hire a programmer to help customize accounts and how their user data shows up in custom menus. Might be a WPMU plugin for that.

  • This reply was modified 11 years by simchris.
Post count: 74

ohh..I just need to put simple links. Can you please guide the top login widget files? Where is it in theme?

Post count: 388

Assuming you have those areas set up for users to view, yeah.

Never done this myself, but here’s a possible starting point for WordPress-esque editing of admin bar, probably to be used in functions.php: http://codex.wordpress.org/Class_Reference/WP_Admin_Bar

Post count: 74

I am not talking about Admin BAr. I am talking about Newspapert Theme Top Menu in which we place tagdiv Login widget. When somebody logins via that widget a username will be displayed and a logout option. The Username comes with not link but a # instead of link. I want to make Username a link and make a 3 more links via dropdrown on username.

Post count: 9544

Likely you will need to locate the file which has the login widget code and edit it to put in generic links on that dropdown, or add query if the links are unique to each user.

If you look in your theme folder, under includes > widgets > td_login_widget.php

you would likely add the links there.

e.g.,

            echo '<ul class="top-header-menu td_ul_logout">
                    <li class="menu-item">
                        <a href="#" class="td_user_logd_in">' . $current_user->display_name . '</a>
                    </li>

                    <li class="menu-item">
                        <span class="td-sp td-sp-ico-logout"></span>
                        <a href="' . wp_logout_url(home_url()) . '">' . __td("Logout") . '</a>' .
                        get_avatar($current_user->ID, 20) .
                    '</li>
                  </ul>';

Always good to “explore” the files and folders for the theme to look at what is there, as this is often the starting point for any special customizations not built into the theme itself. Most of the stuff “included” onto pages/posts that are not main templates are found in the /includes/ folder.

Hope that helped! 🙂

Post count: 74

Thanks a lot christopher. I edited the file but instead of created a dropdown its creating links separately. Here what i did.

            echo '<ul class="top-header-menu td_ul_logout">
                    <li class="menu-item">
                        <a href="#" class="td_user_logd_in">' . $current_user->display_name . '</a>
                         <ul>
                       <li><a href="http://domain.com/dashboard/">Dashboard</a></li>
                       <li><a href="http://domain.com/profile/">Profile</a></li>
                       <li><a href="http://domain.com/add-new/">Add New</a></li>
                    </ul>
                    </li>

You can also please check the output in the pic below.
http://awesomescreenshot.com/0783d2rp48

Any thoughts on how to correct the issue. Thanks a lot.

Post count: 9544

Hi, I have no idea, as I’ve not used that element with the theme myself. Likely you’ll need somebody more experienced on that modification to chime in, or wait for Marius and Radu, etc. to be back on Monday their time. You could keep messing with it, but from first blush I would guess you forgot to add the style class to each item:

<li class="menu-item">

Hope that helped 🙂

(I don’t work here; just helping out!)

Post count: 74

I added the style class but it’s still not working. Thanks for supporting me. I thought you are a member of support team. 🙂

Post count: 6600

Hi,

Thanks @Christopher!

@tenocation

Please add the links like this: http://screencast.com/t/Y6fUz9PwSiwu
Then go to menu-top.php file and make sure you change the span classes like this: http://screencast.com/t/L0uAqUZ4XbK
You will then get this result: http://screencast.com/t/EUhZhJtmPhR
Hope this helps!

Thanks

  • This reply was modified 11 years by Lucian.
Post count: 74

Thanks a lot Lucian. That really helped me. Worked like a charm.

Viewing 12 posts - 1 through 12 (of 12 total)
The forum ‘Newspaper’ is closed to new topics and replies.