Jump to content


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


Framework Login Customization

Recommended Posts

kellid    2



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
Danny    1,327



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
kellid    2

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
Danny    1,327

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

    • flourishdesignstudio
      By flourishdesignstudio
      I have an older site that was built using PageLines several years ago (prior to the release of DMS). I wanted to leverage some of the power of your new PL5 plugin but the theme prevents be from adding any generated custom sidebars to the theme (through the drag and drop interface) and does not allow me to add any PL5 sections/containers/etc to the header or footer. Is there any way to easily override that or am I stuck only using PL5 in the content areas of the site?
      Thanks so much for the help!
    • dougalperman
      By dougalperman+
      Hi there,
      I'm a big fan of Pagelines, and have been for years.
      I'm trying to control the size of video embeds and having some difficulty. I see that I can just paste the Vimeo video URL into the post and an embed widget will automatically appear, which is great. But the embed box created is much taller that the video (689 x 1000 pixels) so the content sits in the middle of a tall black box, which looks awkward.
      I tried using the full iFrame embed code from Vimeo, which solved the disproportionate embed frame size (or aspect ratio) issue, but despite specifying the dimensions I want (690 x 388), the videos displayed on the post are sized at 300 x 150 pixels.
      I can't work out how to change either.
      I'm using the latest version of Pagelines Framework (Pro) with the Agency them.
      Any help or advice very much appreciated.
    • JP
      By JP+
      How can you set the translations with platform5, the parts that are not in pages or posts? Texts and images…
    • romanondrasek
      By romanondrasek
      hi all, I have some trouble using PL5 on my site. 
      I used plugins for event calendar (event on) and plugin (timetable responsive scheduler for WP) for schedule (classes) in the gym.
      The problem is, that post from this 2 plugins are shown without menu in header and footer. (I setup header and footer) in the page editor for all type of page. 
      When I create a lesson, it creates posts with slug (I have a slug "lekce" & event for events).
      I try to edit the post with PL editor, but editor is not opening on the post.

      Do you have some idea where should be some problem? Thanx so much.
      here are links for the sites :
      site with schedule :
      site of one of the class (pilates)
      site with calendar :
      7 side with one event from the calendar :
      when I have my site on DMS2 it was working :-(
    • casseysdesigns
      By casseysdesigns+
      In the past I would use nextbox for this task. However, Platform 5 does not have nextbox. I will do my best to describe what I am trying to do.
      I am creating a template for coaches, each product has its own link but they all share a common coach id. I want to set up the templates with the links for each product with a variable for the coach id so that I can change the coach id for all the links on the site by just changing the value of the variable $coachId. To do this I'll need to do something like the following...
      <a href="salesite.com/productcodes/referringRepId=<?= $coachId ?>" target="_blank">Product Purchase Link</a> Is it possible to do this with Platform 5?