Community Forums › Forums › Archived Forums › General Discussion › Genesis Landing Page Displaced — Why?
Tagged: displaced, landing page, streamline
- This topic has 6 replies, 2 voices, and was last updated 10 years, 11 months ago by
ludvig.
-
AuthorPosts
-
February 3, 2014 at 7:00 pm #88445
ludvig
MemberHey,
To see what I mean just check out this page:
This displacement doesn't happen on my "normal" pages. Before I used the landing page for my contact page, my about page, and my book page. But then when this trouble occured I switched to the normal page.
However, I am now in a position where I must produce a landing page within the coming days, therefore I would greatly appreciate any help I can get from you in finding out why my landing page doesn't look right.
This happened ca 2 months back when I was playing with my theme (PHP), and switched places on my secondary navigation bar, and then switched it back.
Any help is appreciated.
Kind regards,
http://www.startgainingmomentum.com/landing-page/
LudvigFebruary 4, 2014 at 1:51 am #88471Brad Dalton
ParticipantYou may have an unclosed tag which is causing the problem in your PHP or HTML
February 4, 2014 at 8:48 am #88510ludvig
MemberHey Brad,
Thanks for taking the time to help.
However, after taking a look at the link you sent and my PHP, I still don't understand where the problem is.
By looking at the link you sent I figured the problem was this one:
Error Line 189, Column 5: end tag for "li" omitted, but OMITTAG NO was specified
</div></div><div id="inner"><div class="wrap"> <div id="content-sidebar-wr…
You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
But I couldn't find it in my PHP document on line 189.
However, am using Dreamweaver and I saw that there were 3 read RED signs words when using the code "<?php" in the document. Could this be what's causing the problem?
Here's my PHP code:
<?php
/** Start the engine */
require_once( get_template_directory() . '/lib/init.php' );/** Child theme (do not remove) */
define( 'CHILD_THEME_NAME', 'Streamline Theme' );
define( 'CHILD_THEME_URL', 'http://www.studiopress.com/themes/streamline' );/** Add Viewport meta tag for mobile browsers */
add_action( 'genesis_meta', 'streamline_add_viewport_meta_tag' );
function streamline_add_viewport_meta_tag() {
echo '<meta name="viewport" content="width=device-width, initial-scale=1.0"/>';
}/** Create additional color style options */
add_theme_support( 'genesis-style-selector', array( 'streamline-blue' => 'Blue', 'streamline-green' => 'Green' ) );/** Add support for structural wraps */
add_theme_support( 'genesis-structural-wraps', array( 'header', 'nav', 'subnav', 'inner', 'footer-widgets', 'footer' ) );/** Add new image sizes */
add_image_size( 'home-featured', 255, 80, TRUE );
add_image_size( 'post-image', 642, 250, TRUE );
add_image_size( 'thumbnail', 150, 150, TRUE );
add_image_size( 'small', 50, 50, TRUE );
add_image_size( 'Slideshow', 520, 280, TRUE );
add_image_size( 'Small Thumbnail', 70, 70, TRUE );/** Unregister layout settings */
genesis_unregister_layout( 'content-sidebar-sidebar' );
genesis_unregister_layout( 'sidebar-content-sidebar' );
genesis_unregister_layout( 'sidebar-sidebar-content' );/** Unregister secondary sidebar */
unregister_sidebar( 'sidebar-alt' );/** Add support for custom background */
add_custom_background();/** Add support for custom header */
add_theme_support( 'genesis-custom-header', array( 'width' => 960, 'height' => 200 ) );/** Add newsletter section after header */
add_action( 'genesis_before_content_sidebar_wrap', 'streamline_newsletter' );
function streamline_newsletter() {
if ( ! is_home() )
return;genesis_widget_area( 'newsletter', array(
'before' => '<div class="newsletter widget-area">',
) );
}/** Reposition the breadcrumbs */
remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' );
add_action( 'genesis_before_content_sidebar_wrap', 'genesis_do_breadcrumbs' );/** Customize breadcrumbs display */
add_filter( 'genesis_breadcrumb_args', 'streamline_breadcrumb_args' );
function streamline_breadcrumb_args( $args ) {
$args['home'] = 'Home';
$args['sep'] = ' ';
$args['list_sep'] = ', '; // Genesis 1.5 and later
$args['prefix'] = '<div class="breadcrumb"><div class="inner">';
$args['suffix'] = '</div></div>';
$args['labels']['prefix'] = '<span class="home"></span>';
return $args;
}/** Relocate the post info function */
remove_action( 'genesis_before_post_content', 'genesis_post_info' );
add_action( 'genesis_before_post', 'genesis_post_info' );/** Customize the post info function */
add_filter( 'genesis_post_info', 'post_info_filter' );
function post_info_filter($post_info) {
if ( !is_page() ) {
$post_info = '[post_author_posts_link] [post_date] [post_comments] [post_edit]';
return $post_info;
}}/** Add markup around post class */
add_action( 'genesis_before_post', 'streamline_post_markup' );
function streamline_post_markup() { ?>
<div class="post-wrap">
<?php
}add_action( 'genesis_after_post', 'streamline_post_markup_close' );
function streamline_post_markup_close() { ?>
</div>
<?php
}/** Modify the size of the Gravatar in the author box */
add_filter( 'genesis_author_box_gravatar_size', 'streamline_author_box_gravatar_size' );
function streamline_author_box_gravatar_size($size) {
return '80';
}/** Customize the post meta function */
add_filter( 'genesis_post_meta', 'post_meta_filter' );
function post_meta_filter($post_meta) {
if ( !is_page() ) {
$post_meta = '[post_categories before="Filed Under: "] [post_tags before="Tagged: "]';
return $post_meta;
}}/** Add the after post section */
add_action( 'genesis_after_post_content', 'streamline_after_post' );
function streamline_after_post() {
if ( ! is_singular( 'post' ) )
return;
genesis_widget_area( 'after-post', array(
'before' => '<div class="after-post widget-area">',
) );
}/** Add the before comments section */
add_action( 'genesis_after_post_content', 'nabm_add_extra_widget' );
function nabm_add_extra_widget() {
if ( ! is_singular( 'post' ) )
return;
genesis_widget_area( 'before-comments', array(
'before' => '<div class="before-comments widget-area">',
) );
}/** Add support for 3-column footer widgets */
add_theme_support( 'genesis-footer-widgets', 3 );/** Register widget areas */
genesis_register_sidebar( array('id' => 'newsletter',
'name' => __( 'Newsletter', 'streamline' ),
'description' => __( 'This is the newsletter section below the navigation.', 'streamline' ),
) );
genesis_register_sidebar( array(
'id' => 'home-featured-1',
'name' => __( 'Home Featured #1', 'streamline' ),
'description' => __( 'This is the featured #1 column on the homepage.', 'streamline' ),
) );
genesis_register_sidebar( array(
'id' => 'home-featured-2',
'name' => __( 'Home Featured #2', 'streamline' ),
'description' => __( 'This is the featured #2 column on the homepage.', 'streamline' ),
) );
genesis_register_sidebar( array(
'id' => 'home-featured-3',
'name' => __( 'Home Featured #3', 'streamline' ),
'description' => __( 'This is the featured #3 column on the homepage.', 'streamline' ),
) );
genesis_register_sidebar( array(
'id' => 'after-post',
'name' => __( 'After Post', 'streamline' ),
'description' => __( 'This is the after post section.', 'streamline' ),
) );genesis_register_sidebar( array(
'id' => 'before-comments',
'name' => __( 'Before Comments', 'streamline' ),
'description' => __( 'This is the second after post section.', 'streamline' ),
) );/** Moving Your Primary Navigation before Header **/
remove_action( 'genesis_after_header', 'genesis_do_nav' );
add_action( 'genesis_before_header', 'genesis_do_nav' );/** Read More changed to Continue Reading... **/
add_filter( 'excerpt_more', 'child_read_more_link' );
add_filter( 'get_the_content_more_link', 'child_read_more_link' );
add_filter( 'the_content_more_link', 'child_read_more_link' );
function child_read_more_link() {
return 'Continue Reading...';}
add_filter( 'genesis_nav_items', 'sws_social_icons', 10, 2 );
add_filter( 'wp_nav_menu_items', 'sws_social_icons', 10, 2 );function sws_social_icons($menu, $args) {
$args = (array)$args;
if ( 'primary' !== $args['theme_location'] )
return $menu;
ob_start();
dynamic_sidebar('Social Menu');
$social = ob_get_clean();
return $menu . $social;
}if ( function_exists( 'add_theme_support' ) )
add_theme_support( 'post-thumbnails' );
/** MANUAL EXCEPRTS FOR RSS FEED... **/
function excerpt_read_more_link($output) {
global $post;
return $output . 'ID) . '"> Read More...';
}February 4, 2014 at 10:43 am #88549Brad Dalton
Participant1. You don't need any php tags. Not sure why you have them.
2. You could also deactivate plugins and see if that solved the problem however it may be an unclosed tag within the content area so you'll need to check your editor and widgets.
3. Also not sure where you got this code but it looks suspect and not Genesis code:
function sws_social_icons($menu, $args) { $args = (array)$args; if ( 'primary' !== $args['theme_location'] ) return $menu; ob_start(); dynamic_sidebar('Social Menu'); $social = ob_get_clean(); return $menu . $social; }
4. You don't use dynamic_sidebar for a genesis_widget_area().
I can only imagine where you got it from!
February 5, 2014 at 2:42 am #88725ludvig
MemberI did the following:
I tried doing everything you suggested above, but there was no difference.
It did however crash my site, and despite refreshing, I don't know what it was that caused the site to crash. I believe it was when I removed the "non-genesis code".
Then I restored everything back to how it was, but the page was still looking weird. This was probably because of WC3Cache or other plugins. So I deactived them all. Then it was all restored to normal.
--- So I gained nothing, except having to fix and readjust plugins.
...........
I still have no idea what is causing this displacement of the landing page.Any kind of tips would be appreciated.
February 5, 2014 at 3:02 am #88726ludvig
MemberHere's an image of how it looked when the the home (and other pages) [[BUT NOT THE LANDING PAGE!] crashed.
February 5, 2014 at 10:24 am #88773ludvig
MemberHere's the PHP code inside my Genesis "page_landing" document looks like. (But as far as I can remember I have not touched it):
<?php
/**
* This file adds the Landing template to the Streamline Child Theme.
*
* @author StudioPress
* @package Generate
* @subpackage Customizations
*//*
Template Name: Landing
*/// Add custom body class to the head
add_filter( 'body_class', 'streamline_add_body_class' );
function streamline_add_body_class( $classes ) {
$classes[] = 'streamline-landing';
return $classes;
}// Remove header, navigation, breadcrumbs, footer widgets, footer
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
remove_action( 'genesis_header', 'genesis_header_markup_open', 5 );
remove_action( 'genesis_header', 'genesis_do_header' );
remove_action( 'genesis_header', 'genesis_header_markup_close', 15 );
remove_action( 'genesis_after_header', 'genesis_do_nav' );
remove_action( 'genesis_after_header', 'genesis_do_subnav', 15 );
remove_action( 'genesis_before_content_sidebar_wrap', 'genesis_do_breadcrumbs');
remove_action( 'genesis_before_footer', 'genesis_footer_widget_areas' );
remove_action( 'genesis_footer', 'genesis_footer_markup_open', 5 );
remove_action( 'genesis_footer', 'genesis_do_footer' );
remove_action( 'genesis_footer', 'genesis_footer_markup_close', 15 );genesis();
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.