• Resolved Ircsome

    (@ircsome)


    Using a child theme with twentythirteen.

    Menu sticks OK on regular pages.

    Created a simple page template for my home page. Menu does not stick when I use this template.

    <?php
    /*
    Template Name: Page Full Width - No Sidebars
     *
     * The template for a page in full width with no sidebars
     *
     * This is the template that displays all pages by default.
     * Please note that this is the WordPress construct of pages and that other
     * 'pages' on your WordPress site will use a different template.
     *
     * @package WordPress
     * @subpackage Twenty_Thirteen
     * @since Twenty Thirteen 1.0
     */
    
    get_header(); ?>
    
    	<div id="primary" class="content-area">
    		<div id="content" class="site-content" role="main">
    
    			<?php /* The loop */ ?>
    			<?php while ( have_posts() ) : the_post(); ?>
    
    				<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    					<header class="entry-header-full-width">
    						<?php if ( has_post_thumbnail() && ! post_password_required() ) : ?>
    						<div class="entry-thumbnail">
    							<?php the_post_thumbnail(); ?>
    						</div>
    						<?php endif; ?>
    
    						<h1 class="entry-title-full-width"><?php the_title(); ?></h1>
    					</header><!-- .entry-header -->
    
    					<div class="entry-content-full-width">
    						<?php the_content(); ?>
    						<?php wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) ); ?>
    					</div><!-- .entry-content -->
    
    					<footer class="entry-meta-full-width">
    						<?php edit_post_link( __( 'Edit', 'twentythirteen' ), '<span class="edit-link">', '</span>' ); ?>
    					</footer><!-- .entry-meta -->
    				</article><!-- #post -->
    
    				<?php comments_template(); ?>
    			<?php endwhile; ?>
    
    		</div><!-- #content -->
    	</div><!-- #primary -->

    https://wordpress.org/plugins/lowermedia-sticky-js-menus/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author hawkeye126

    (@hawkeye126)

    Thanks for using the plugin!
    Here are a few questions:

    Have you made any edits to this file?

    Do you have the menu set as the primary menu in appearance menus?

    Can you provide a link to the site?

    Thread Starter Ircsome

    (@ircsome)

    No edits …

    primary menu …

    home page http://198.91.24.166/ … uses custom template (above) … menu doesn’t stick.

    click any of the navigation links … new page … menu does stick.

    Thread Starter Ircsome

    (@ircsome)

    ps … may be relevant – I also use ubermenu.

    Thread Starter Ircsome

    (@ircsome)

    pps I did try adding this to lowermedia-sticky-js-menus.php … looked as though it might be relevant, but no effect.

    && $theme_data['Template']!='rejoice'

    rejoice is the name of my child theme.

    Plugin Author hawkeye126

    (@hawkeye126)

    I should have realized this before but it’s because you are not including the footer.

    <?php get_footer(); ?>

    Thread Starter Ircsome

    (@ircsome)

    ppps I’m thinking this is conflicting with ubermenu. ubermenu provides their own sticky plugin, so I think I’m gonna go with that. I’ll be switching it later today. In the meantime you can still check it out.

    I’m pretty sure that the class lowermedia_add_sticky is not being added correctly, and it’s just chance that the regular pages work OK.

    Thanks for responding, and good luck with your plugin.

    Plugin Author hawkeye126

    (@hawkeye126)

    Plugin Author hawkeye126

    (@hawkeye126)

    I am confident the problem lies w/in your template file and not the plugin. The template file you added here does not include the footer (where the js file the plugin uses is included). The pages that work have the footer information included. Thanks for using the plugin and good luck with your site!

    Thread Starter Ircsome

    (@ircsome)

    makes perfect sense! I’ve added footer back and it’s all good.

    so it works fine with ubermenu.

    I should’ve also worked that out.

    Thanks for the quick response.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Menu Not Sticking on Custom Page Template’ is closed to new replies.