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.
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!
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.
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!
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!
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.