Adding Submenu in Newspaper6

Posted in: Newspaper
Post count: 5

Hi,

I just upgraded to Newspaper 6 today due the latest Visual Composer not working with Newspaper 4 (at least, it didn’t for me). Anyway, I’m trying to create a page template, however I’m having a few issues.

Effectively, the template that I created allowed was a standard page, but had a logo (Background image) at the top of the page content (underneath the header), with a menu underneath. The code for this on Newspaper 4 was:

get_header();

if (have_posts()) { ?>
    <?php while ( have_posts() ) : the_post(); ?>
        <div class="container td-page-wrap">
            <div class="row">
                <div class="span12"><strong><div id="wtog-logo"></div>								<div id="wtog-menu"><?php wp_nav_menu( array( 'theme_location' => 'wtog', 'container' => '')); ?>					</div>		</strong>	
                    <div class="td-grid-wrap">
                        <div class="container-fluid">												
                            <?php the_content(); ?>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    <?php endwhile; ?>
<?php } else {
    echo td_page_generator::no_posts();
}

get_footer();

All of the pagebuilder/visual composer content would show as normal below this ‘submenu’ (wtog-menu). What would be the best way to have the same shown in Newspaper 6? I noticed the code on the other existing templates are much more complex, so any help would be appreciated.

  • This topic was modified 10 years by BrettLP. Reason: Wrong Forum
  • This topic was modified 10 years by BrettLP.
Post count: 7909

Hi,

The latest version of Visual Composer was tested only with Newspaper 6.
Regarding you custom page template, you can create your own page template in the root of the theme and copy the code from page.php(default template) and just add this comment instead – http://screencast.com/t/UdDaIQhr It should appear on template options – http://screencast.com/t/cONiVSlbjH7 Then add your custom modification to the code.

Thanks!

Post count: 5

Hi Alin,

Thanks for that, I’ve already reached that far. However, I’m just trying to work out where in the code on that template to add this:

<div id="wtog-logo"></div> <div id="wtog-menu"><?php wp_nav_menu( array( 'theme_location' => 'wtog', 'container' => '')); ?> </div>

So that it would work, with all the page content rendering underneath it normally.

Post count: 22421

Hello,

If you want the modification below the header and above all the content, simply place the code directly above the main content div: http://screencast.com/t/Is6mWYqhd so the content will not be affected by it.

Thank you!

Post count: 5

Hi Bogdan,

Thanks for the help! That works using the pagebuilder page template as the new template. Yet, what if I was to use the default page template? (page.php). I tried placing the above code above the wrap, with no luck.

Thanks!

Post count: 22421

Hi,

It works on the default template too, you just need to place the code in the case used. There are 2 cases: ‘// the page is rendered using the page builder template (no sidebars)’ and ‘//no page builder detected, we load a default page template with sidebar / no sidebar’ : http://screencast.com/t/BxIdewOs
You can place the code in both cases if you want because it will only display the one detected.
This is how it looks like on my end. This is on the default template : http://screencast.com/t/i6BtIxN7t2

Thank you!

Post count: 5

Thanks Bogdan! You’ve solved that completely!

How about if I wanted to add it, so it shows up at the top of a post? (So under the header, but above the content). Where I should I add the code on the default template? Thanks!

Post count: 22421

Hello,

For posts you will have to identify the post style used and add the code in the corresponding php file: http://screencast.com/t/ht8ZL2VPOD and add the code inside the main content wrapper: http://screencast.com/t/vqpXnBSGR

Thanks.

Viewing 8 posts - 1 through 8 (of 8 total)
The forum ‘Newspaper’ is closed to new topics and replies.