WP register and sign in help
-
Hi there
how do i activate this Guest,Login/register? on my website? at the top right of the sitethe site is only a play site where i can test my ideas can anyone help me
i can give you login details if you need,
-
Try it with this:
<?php if ( is_user_logged_in() ) { $current_user = wp_get_current_user(); echo 'Hello '.$current_user->display_name .', '; wp_loginout(get_home_url()); } else { echo 'Hello Guest, '; wp_loginout(); wp_register( ' | ', ''); } ?>
hi thanks keesiemeijer
where do i put this code
sorry im new to this,…Depending on your theme you can probably put in your theme’s header.php
What theme are you using?
storewp
By Patrick vieraVersion 1.0this is my theme,
i will try it out now and see thanks again,under this , storewp: Header (header.php) i have pastted its nearly done but i now have doubble logins hehehe
<?php if ( is_user_logged_in() ) { $current_user = wp_get_current_user(); echo 'Hello '.$current_user->display_name .', '; wp_loginout(get_home_url()); } else { echo 'Hello Guest, '; wp_loginout(); wp_register( ' | ', ''); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head profile="http://gmpg.org/xfn/11"> <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" /> <title> <?php if ( is_home() ) { ?><?php bloginfo('name'); ?> - <?php bloginfo('description'); } else { ?><?php wp_title(''); ?> - <?php bloginfo('name'); } ?></title> <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" /> <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" /> <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" /> <link rel="Shortcut Icon" href="<?php bloginfo('stylesheet_directory');?>/images/favicon.ico" type="image/x-icon" /> <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/tabs.js"></script> <?php wp_head(); ?> <script type="text/javascript"> <!-- if (top.location!= self.location) { top.location = self.location.href } //--> </script> </head> <body> <div id="wrap"> <div id="topnav"> <div id="topnav-left"> <ul><?php wp_list_pages('title_li=&depth=4&sort_column=menu_order');?></ul> </div> <div id="topnav-right"> Hello Guest, Login | Register </div> <div style="clear: both"></div> </div> <div id="header"> <div id="header-left"> <div class="logo"><a>"><?php bloginfo('name'); ?></a> </div><div class="desc"><a>"><?php bloginfo('description'); ?></a></div> </div> <div id="header-right"> <div id="header-right-1"> <form method="get" id="search" action="<?php bloginfo('url'); ?>/"> <input id="search-box" type="text" value="Search ... " onfocus="if (this.value==this.defaultValue) this.value='';" name="s" size="20" /> <input id="search-button" type="submit" value="Search" /> </form> </div> <div id="header-right-2"> <div class="cart"> Shopping Cart </div> <div class="total">You have 0 <strong>(<?php echo get_theme_option('amazon_currency');?>0)</strong> item in your Shopping Bag </div> </div> </div> </div> <div id="nav"> <ul id="ddmenu"> <li><a>href="<?php bloginfo('url'); ?>"><img src="<?php bloginfo('stylesheet_directory');?>/images/home.png" border="0px" width="20" height="22" alt="<?php bloginfo('description');?>"/> </a></li> <?php wp_list_categories('sort_column=menu_order&hide_empty=1&title_li='); ?> </div><div style="clear: both"></div>
YEY!!!
you fixed It
thank you very very muchNot sure how you fixed it, but you could try it with this: http://pastebin.com/6XF5DFWh
You should not put it above the DOCTYPE
- The topic ‘WP register and sign in help’ is closed to new replies.