test topic

Replies
1
Voices
2
Freshness
Followers

0

add_filter( 'wp_nav_menu_items', 'add_custom_menu_item', 10, 2 );
function add_custom_menu_item ( $items, $args ) {
if ( $args->theme_location == 'primary-nav') {
ob_start();

if ( ! is_user_logged_in() ) {
$loginoutlink = '<a href="/wp-content/plugins/emp/emp-membership-proc.php?flag=login&return_host='. $_SERVER['HTTP_HOST'] .'&return_page='. $_SERVER['REQUEST_URI'] .'">' . __( 'Sign In' ) . '</a>';
} else {
$loginoutlink = '<a href="/wp-content/plugins/emp/emp-membership-proc.php?flag=logout&return_host='. $_SERVER['HTTP_HOST'] .'&return_page='. $_SERVER['REQUEST_URI'] .'">' . __( 'Sign Out' ) . '</a>';
$loginoutlink .= '| &nbsp;&nbsp;<a href="/enter-password/">My Account</a> ';
}

ob_end_clean();
$items = '<li>'. $loginoutlink .'</li>'.$items;

}
return $items;
}

 

  • Edit

    Hey DongHoon Lee,

    Thanks for testing out our forum! I hope you're enjoying it. Wanted to mention that we have a demo forum where we usually post test posts at https://demo.wpdiscussionboard.com.

    Test posts that are posted here on our support forum are usually deleted :)

    Do let me know if you have any questions.
    Matt