Jump to content


This topic is now archived and is closed to further replies.


Framework Login Customization

Recommended Posts




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  [email protected]
 * @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



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:



Please search our forums, before posting!

Share this post

Link to post
Share on other sites

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

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

Please search our forums, before posting!

Share this post

Link to post
Share on other sites

  • Similar Content

    • Kedark
      By Kedark+
      Hello, I need help. Can and how to do it. I need to add more page appearance templates (page attributes). At the moment it's default and FRAMEWORK A, FRAMEWORK B etc. I need to add two more. How can I do this.
      Unfortunately, I did not find such a thread on the forum.
    • jeomiland
      By jeomiland+
      Hi guys
      Hopefully an easy question. I have some custom code included in a Next section in a DMS site that I'm converting to platform5. What is the easiest way to insert my code into a "section" which I can easily add to my page structure with the platform5 page editor? I have the Embed extension but that takes javeascript, and my PHP test failed. Also have the Shortcodes extension, but looks like that only inserts objects into the WP-loop? and again, how to create a Hook that can go here?
    • KathleenAspenns
      By KathleenAspenns+
      I would like to upgrade my site to PHP 7, but there is an error warning in the PL Framework theme. I should think this should be fixed asap, I cannot be the only person trying to be up to date.
      1976 | ERROR | preg_replace() - /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
    • Dan Haddock
      By Dan Haddock
      DMS: Latest Version
      Running a Child Theme
      Wordpress: 4.8.3
      Akismet Anti-Spam 
      Coming Soon Page & Maintenance Mode by SeedProd
      Contact Form 7
      Cookie Law Info
      DMS Professional Tools    
      Enhanced Media Library
      Google Analytics for WordPress by MonsterInsights
      Google XML Sitemap    
      Jetpack by WordPress.com
      MailChimp for WordPress
      PageLines Updater
      Really Simple SSL
      Schema App Structured Data
      Sucuri Security - Auditing, Malware Scanner and Hardening  
      Uber reCaptcha
      Yoast SEO
      Problem Below
      Hi Team,
      I am looking to style the Continue Reading Button with the PHP you provided in an earlier ticket here: 
      I put the PHP code into my site, however I do not get my Icon back, I just get back Read More >>
      I have attached a screenshot of the code in place on my site along with the output.
      Interested to know what I may be doing wrong? - I am very new to PHP so a bit apprehensive on this.
      The Images: https://drive.google.com/open?id=0B0i4JJXa2jdQN2xoakZNRUdmaU0
      Let me know if you need any more information from me.
    • Paul
      By Paul+
      I was surprised to see I had no menu today - out of the blue - its actually moved to the bottom of the page!  After hours of fiddling and disabling every single plugin, leaving just plagelines the issue is still present.  See video for a basic text box - I moved it into the head and it jumps to the bottom and shows just above the footer but below the main content.  I have a temp fix by placing the menu into the first row on the main content but it does mean other than my home page, all other pages have no menu.  A quick fix is very urgent for this bug.