Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Help adding a logout link to my footer menu!

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #203831
    paulmc911
    Participant

    Hi all

    I currently have this code in my functions.php to control my footer menu:

    `add_filter(‘omega_footer_insert’, ‘my_omega_footer_insert’, 11);

    function my_omega_footer_insert( $settings ) {
    $year = date( ‘Y’ );
    $siteurl = get_bloginfo( ‘url’ );
    $sitename = get_bloginfo( ‘name’ );
    return “<a href=’http://bibliophone.com/about/’>About</af=’http://bibliophone.com/terms-of-use/’>Terms</a&gt; | <a href=’http://bibliophone.com/privacy-policy/’>Privacy</a><br>© <a href=’$siteurl’>$sitename</a> $year</p>”;
    }`

    I want to add a logout link to this, which displays ONLY when a user is registered and logged in. I have this code:

    if ( is_user_logged_in() ) {
    echo ' | &lt;a href="&lt;?php echo wp_logout_url( get_permalink() ); ?&gt;" title="Logout"&gt;Logout&lt;/a&gt;';
    }

    ..but I’m not having mu luck with it because I don’t know for certain that it’s correct, and secondly I’m not sure where it should be placed within the first bit of code above. Can anyone help please?

    Thank you!

    Paul

    #204072
    chrisburton
    Participant

    Please use something like hastebin.com to post your code if you’re not familiar with Markdown formatting.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Back End’ is closed to new topics and replies.