• 0
Sign in to follow this  
Followers 0

Framework Login Customization


Posted · Report post



A few months ago, I added a drop down login box to my header and it worked perfectly.  Since then, I accidentally deleted my header file and when uploading a copy to cpanel, it isn't working properly and I can't figure out why.  I don't believe I changed any of the code in the file and not much else has changed, but when I go to enter my "Username" the box disappears.  


Do you see the error? 


Thanks in advance for your help!!





 * This file controls the HTML <head> and top graphical markup (including
 * Navigation) for each page in your theme. You can control what shows up where
 * using WordPress and PageLines PHP conditionals.
 * @package     PageLines Framework
 * @since       1.0
 * @link        http://www.pagelines.com/
 * @link        http://www.pagelines.com/tour
 * @author      PageLines   http://www.pagelines.com/
 * @copyright   Copyright (c) 2008-2012, PageLines  hello@pagelines.com
 * @internal    last revised January 23, 2012
 * @version     ...
 * @todo Define version

pagelines_register_hook('pagelines_before_html'); // Hook
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
		<meta http-equiv="content-type" content="text/html;charset=utf-8">
		pagelines_register_hook('pagelines_head'); // Hook 
		wp_head(); // Hook (WordPress) 
		pagelines_register_hook('pagelines_head_last'); // Hook ?>


echo pl_source_comment('Start >> HTML Body', 1); ?>
<body <?php body_class( pagelines_body_classes() ); ?>>
pagelines_register_hook('pagelines_before_site'); // Hook

else:  ?>
<div id="site" class="<?php echo pagelines_layout_mode();?>">
<?php pagelines_register_hook('pagelines_before_page'); // Hook ?>
	<div id="page" class="thepage">
		<?php pagelines_register_hook('pagelines_page'); // Hook ?>
		<div class="page-canvas">
			<?php pagelines_register_hook('pagelines_before_header');?>
			<header id="header" class="container-group">
			<ul class="headerlinks">
<strong><script language="JavaScript">
var myDate = new Date();
/* hour is before noon */
if ( myDate.getHours() < 12 )
    document.write("Good Morning!");
else  /* Hour is from noon to 5pm (actually to 5:59 pm) */
if ( myDate.getHours() >= 12 && myDate.getHours() <= 17 )
    document.write("Good Afternoon!");
else  /* the hour is after 5pm, so it is between 6pm and midnight */
if ( myDate.getHours() > 17 && myDate.getHours() <= 24 )
    document.write("Good Evening!");
else  /* the hour is not between 0 and 24, so something is wrong */
    document.write("I'm not sure what time it is!");
          <!-- here comes the important part -->
 <!---------------------------------------  DROPDOWN LOGIN CODE STARTS HERE      ---------------------------------------------->
 <style type="text/css">
 .dropdown.open .dropdown-menu {
    display: block;
    padding: 20px !important;
           <li class="dropdown" id="menu1">
             <a class="dropdown-toggle" data-toggle="dropdown" href="#menu1">
                <b class="caret"></b>
             <div class="dropdown-menu">
if ( ! is_user_logged_in() ) { // Display WordPress login form:
    $args = array(
        'redirect' => admin_url(), 
        'label_username' => __( 'Username' ),
        'label_password' => __( 'Password' ),
        'label_remember' => __( 'Remember Me!' ),
        'label_log_in' => __( 'Log Me In' ),
        'remember' => true
    wp_login_form( $args );
} else { // If logged in:
    wp_loginout( home_url() ); // Display "Log Out" link.
    echo " | ";
    wp_register('', ''); // Display "Site Admin" link.
 <!---------------------------------------  DROPDOWN LOGIN CODE ENDS HERE      ---------------------------------------------->

				<div class="outline">
					<?php pagelines_template_area('pagelines_header', 'header'); // Hook ?>
			<?php pagelines_register_hook('pagelines_before_main'); // Hook ?>
			<div id="page-main" class="container-group">
				<div id="dynamic-content" class="outline">	


Share this post

Link to post
Share on other sites

3 answers to this question

  • 0

Posted · Report post



Unfortunately, we do not provide support to users who have edited the core files of our products. If you wanted to add some custom code to your header, you will need to use a hook if you wish for use to provide support.


I recommend you remove all your custom code so that the header.php file is reverted back to default, then we may be able to provide assistance, although user created code isn't something we provide support for.


In my opinion, if all you're trying to do is get some menu items to display when a user is logged in or not logged in, then just use the standard WordPress menu with a plugin like this:



Share this post

Link to post
Share on other sites
  • 0

Posted · Report post

Thanks for your response Danny.  I'm not trying to display menu items but add a dropdown login module to my header.  

I'll look into hooks!



Share this post

Link to post
Share on other sites
  • 0

Posted · Report post

OK, then yeah Hooks is what you will need to use then.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0