BuddyBoss
BuddyBoss
  • Product
    • Features
      • Connect your people
      • Make it fun and engaging
      • Sell access, generate revenue & create wealth
      • Everything you need to customize for your brand
      • Launch your online courses
      • Amplify your impact with the power of mobile
    • Integrations
    • Platform
    • Use Cases
      • For Online Communities
      • For Online Courses
      • For Membership Sites
      • For LearnDash
      • For LifterLMS
    • Mobile Apps
      • For Online Communities
      • For LearnDash
      • For Online Courses
      • For Membership Programs
    • Showcase
    • Roadmap
  • Agency
    • Case Studies
    • Expertise
    • Enterprise
    • Retainers
    • Agency Partners
    • Staff Augmentation
  • Resources
    • Step by step documentation for easy BuddyBoss setup
    • Create a new ticket, and get help from the BuddyBoss support team
    • More Resources
      • Blog
      • Videos
      • Webinars
      • Code Reference
      • Release Notes
      • Git
  • Features
    • Connect your people
    • Make it fun and engaging
    • Sell access, generate revenue & create wealth
    • Everything you need to customize for your brand
    • Launch your online courses
    • Amplify your impact with the power of mobile
  • Get More Out Of BuddyBoss
  • Platform
  • Use Cases
    • For Online Communities
    • For Online Courses
    • For Membership Sites
    • For LearnDash
    • For LifterLMS
  • Mobile App
    • For Online Communities
    • For LearnDash
    • For Online Courses
    • For Membership Programs
  • Showcase
  • Roadmap
My Account
My Account
Pricing

Support Forums

BuddyBoss Home – Web › Support Forums › Themes › OneSocial theme › How to add Sign in / Sign out option on Titlebar Menu

Tagged: log-in, log-out, Sign in, sign out

  • This topic has 3 replies, 2 contibutors, and was last updated 6 years, 5 months ago by Anve S..
Viewing 4 posts - 1 through 4 (of 4 total)
  • Question

    March 3, 2016 at 10:10 am #61309

    Karen Thomas
    @conscious-crafties

    Hiya,

    I'm trying to add a sign in/sign out to my Titlebar menu so it's very clear to users how to log in.

    I've previously used this piece of code in my function.php for my previous theme (copied off internet as I can't code myself!)

    /* Add Log In Log Out to Titlebar menu*/
    add_filter( 'wp_nav_menu_items', 'add_loginout_link', 10, 2 );
    function add_loginout_link( $items, $args ) {
        if (is_user_logged_in() && $args->theme_location == 'Titlebar_menu') {
            $items .= '<li><a href="'. wp_logout_url() .'">Log Out</a></li>';
        }
        elseif (!is_user_logged_in() && $args->theme_location == 'Titlebar_menu') {
            $items .= '<li><a href="'. site_url('wp-login.php') .'">Log In</a></li>';
        }
        return $items;
    }
    
    

    I can't get it to work in One Social though:

    Do you know where I'm going wrong? Is Titlebar menu called something else?

    Many thanks,

    Karen

    Answers

    March 10, 2016 at 6:13 am #62339

    Karen Thomas
    @conscious-crafties

    Bumping this one as still waiting, thanks

    March 10, 2016 at 11:41 am #62395

    Karen Thomas
    @conscious-crafties

    I don't feel I need this now that I have removed the admin tool bar, as it's easier to see where to log in/out now 🙂 You can close this one

    March 17, 2016 at 2:16 am #63523

    Anve S.
    @anve

    Great 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • The question ‘How to add Sign in / Sign out option on Titlebar Menu’ is closed to new replies.
  • Helpful Information
    • Privacy Policy
    • Refund Policy
    • Terms and Conditions
    • Support Policy
    • Licenses & Subscriptions

  • View Themes Custom Work
    STAY IN TOUCH
    Subscribe to our Newsletter, and we’ll send you the latest news from BuddyBoss
    • Hidden
    • This field is for validation purposes and should be left unchanged.
    COMPANY
    • Blog
    • Contact Us
    • Media Kit
    • Affiliate Program
    • Terms & Conditions
    • Support Policy
    • Privacy Policy
    • Affiliate Program Terms
    SOLUTIONS
    • Community Software
    • Online Courses Software
    • LearnDash Theme
    • LifterLMS Theme
    • Themes
    • BuddyPress Plugins
    • BuddyBoss vs BuddyPress
    AGENCY
    • Agency Overview
    • Retainers
    • Enterprise
    • Expertise & Services
    • Case Studies
    • Partners
    • Staff Augmentation
    RESOURCES
    • Frequently Asked Questions
    • Documentation
    • Code Reference
    • Webinars
    • Videos & Tutorials
    • Create Support Ticket
    • Roadmap
    • My Account

    © All rights reserved Boss Media Ltd. 2022

    Terms & Conditions Privacy Policy

    Not recently active
    62fea86c5f114