After searching and watching some vidoes I still have one minor problem. I have configured everything so far without much problems. I am just in the process of trying to append a "My Page" link in my header, right near the "Logged in as xxusername / Log Out"
I understand that each template is different, I have identified where it needs to go but a coder I am not. I have tried a few different things but with no luck.
I am about 90% sure the code I have to paste is....
- Code: Select all
<?php if (S2MEMBER_CURRENT_USER_IS_LOGGED_IN){ ?>
<a href="<?php echo S2MEMBER_LOGIN_WELCOME_PAGE_URL; ?>">My Account</a>
| <a href="<?php echo S2MEMBER_LOGOUT_PAGE_URL; ?>">Logout</a>
<?php } ?>
But for the life of me I cannot find where to paste this into my current header.php, which is attached below
- Code: Select all
<?php
/**********************************************************************
* File name:
* header.php
* Brief:
* Header and navigation code for all theme files
***********************************************************************/
?><?php
ob_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" <?php language_attributes(); ?> >
<!-- HEAD -->
<head>
<meta name="author" content="DigitalCavalry" />
<meta name="language" content="english" />
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<?php
if(!GetDCCPInterface()->getIGeneral()->hideWordPressVer())
{
echo '<meta name="generator" content="WordPress '.get_bloginfo('version').'" />';
}
$dccp = GetDCCPInterface()->printMeta();
?>
<title><?php bloginfo('name'); ?><?php wp_title('-'); ?></title>
<!-- ICON -->
<link rel="icon" href="" type="image/x-icon" />
<!-- CSS (Cascading Style Sheets) Files -->
<link type="text/css" rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" />
<link type="text/css" rel="stylesheet" href="<?php bloginfo("template_url"); ?>/css/sh/shCore.css" />
<link type="text/css" rel="stylesheet" href="<?php bloginfo("template_url"); ?>/css/sh/shThemeRDark.css" />
<!--<link type="text/css" rel="stylesheet" href="/css/slimbox/slimbox2.css" />-->
<link type="text/css" rel="stylesheet" href="<?php bloginfo("template_url"); ?>/css/pphoto/prettyPhoto.css" />
<link type="text/css" rel="stylesheet" href="<?php bloginfo("template_url"); ?>/css/slider_prestige.css" />
<link type="text/css" rel="stylesheet" href="<?php bloginfo("template_url"); ?>/css/slider_accordion.css" />
<link type="text/css" rel="stylesheet" href="<?php bloginfo("template_url"); ?>/css/slider_progress.css" />
<link type="text/css" rel="stylesheet" href="<?php bloginfo("template_url"); ?>/css/slider_video.css" />
<link type="text/css" rel="stylesheet" href="<?php bloginfo("template_url"); ?>/css/addPages.css" />
<link type="text/css" rel="stylesheet" href="<?php bloginfo("template_url"); ?>/css/tipsy/tipsy.css" />
<link type="text/css" rel="stylesheet" href="<?php bloginfo("template_url"); ?>/css/tipsy/tipsy-docs.css" />
<link type="text/css" rel="stylesheet" href="<?php bloginfo("template_url"); ?>/css/common.css" />
<!-- JavaScript Files -->
<?php
if(is_singular())
{
wp_enqueue_script('comment-reply');
}
wp_head();
GetDCCPInterface()->getIGeneral()->customCSS();
GetDCCPInterface()->getIMenu()->customCSS();
GetDCCPInterface()->getIGeneral()->sliderJavaScript();
?>
<script language='javascript'>
SyntaxHighlighter.config.stripBrs = true;
SyntaxHighlighter.all();
</script>
<?php GetDCCPInterface()->getIGeneral()->printHeaderTrackingCode(); ?>
</head>
<body>
<?php GetDCCPInterface()->getIGeneral()->renderAnnouncementBar(); ?>
<!-- HEADER CONTAINER & MENU -->
<?php
if(GetDCCPInterface()->getIGeneral()->showClientPanel())
{
GetDCCPInterface()->getIClientPanel()->renderPanel();
}
?>
<div id="login-popup">
<form action="<?php bloginfo('url'); ?>/wp-login.php" method="post">
<div class="close"></div>
<p class="label">Username:</p>
<input type="text" value="Username" name="log" />
<p class="label">Password:</p>
<input type="password" value="Password" name="pwd" />
<input type="submit" class="send-btn" value="Login" />
<div class="clear-both"></div>
<a href="<?php bloginfo('url'); ?>/wp-login.php?action=lostpassword">Forgot Password?</a> / <a href="#" class="help">Help</a>
</form>
</div>
<div id="header-container">
<div id="header-search-popup">
<form action="<?php bloginfo('url'); ?>" method="get">
<input type="text" value="<?php $search_query = (get_query_var( 's' )) ? get_query_var( 's' ) : 'Search..'; echo $search_query; ?>" name="s" />
</form>
</div>
<a id="header-search-btn"><img class="unitPng" src="<?php bloginfo('template_url'); ?>/img/common_files/search.png" /></a>
<a name="top-anchor"></a>
<a class="logo" href="<?php echo get_bloginfo('url'); ?>"></a>
<?php
GetDCCPInterface()->getIGeneral()->renderHeaderIcons();
GetDCCPInterface()->getIMenu()->renderMenu();
?>
<?php
if(GetDCCPInterface()->getIGeneral()->showHeaderLogPanel())
{
$out = '';
$out .= '<div id="header-login-panel">';
global $current_user;
get_currentuserinfo();
if($current_user->ID)
{
$out .= '<span>Logged as</span> <span class="user">'.$current_user->display_name.'</span>';
$out .= ' / <a href="'.get_bloginfo('url').'/wp-login.php?action=logout">Log Out</a>';
} else
{
$out .= '<span class="sign-in" >Log In</span>';
}
// $out .= '< / <a href="#" class="help">Register</a>';
$out .= '</div>';
echo $out;
}
?>
</div> <!-- header-container -->
I appreciate all your help in these regards, thanks in advance