# Using Wordpress top menu bar on the Discourse side?

**URL:** https://meta.discourse.org/t/using-wordpress-top-menu-bar-on-the-discourse-side/91716
**Category:** WordPress
**Created:** [July 6, 2018, 2:27pm UTC](https://meta.discourse.org/t/using-wordpress-top-menu-bar-on-the-discourse-side/91716 "2018-07-06T14:27:30Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![bekircem](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bekircem/32/44582_2.png) [@bekircem](https://meta.discourse.org/u/bekircem)
#### Post date: [July 6, 2018, 2:27pm UTC](https://meta.discourse.org/t/using-wordpress-top-menu-bar-on-the-discourse-side/91716/1 "2018-07-06T14:27:30Z")

</div>

Hi,

We are using BuddyPress + Wordpress and Discourse. We configured SSO settings. We set WordPress instance as the SSO provider.

We have user profile menu on Wordpress top menu bar. I wonder, is this possible to use top menu bar on Discourse side too with dynamic links like user profile menu?

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [July 6, 2018, 5:10pm UTC](https://meta.discourse.org/t/using-wordpress-top-menu-bar-on-the-discourse-side/91716/2 "2018-07-06T17:10:15Z")

</div>

You could try recreating the WordPress menu bar with HTML and CSS. It can be added to your Discourse theme `Header` section. For a logged in user on WordPress `http://example.com/wp-admin/profile.php` will link the user to their profile page. Since you are using SSO, if you only show that link to logged in users, it will work. That can be done by adding and removing a class with some javascript that checks for the presence of a user.

```plaintext
// CSS
.wp-profile-link {
    display: none;
}

.wp-profile-link.current-user {
    display: block;
}

```

Added to the `/head` section of a theme:

```plaintext
<script type="text/discourse-plugin" version="0.8.18">
if (api.getCurrentUser()) {
    $('.wp-profile-link').addClass('current-user');
} else {
    $('.wp-profile-link').removeClass('current-user');
}
</script>

```
