Custom Template with Blog & Portfolio on same page
-
Hello! I’m trying to create a custom template for the Pinnacle theme. The idea is that the author of the page is used to fetch the last blog-post and last portfolio-item created by this user. I’ve done this with Page Builder by SiteOrigin, but found it to be not so good looking.
So, the idea is that both the post and portfolio would be displayed next to each other (same row) on the page. In the future I would like to display also the page-author biography and page-author occupation, but first things first: for now only the last blog-post next to last portfolio-item.
I’ve already made a child-theme, template-folder and inside the template folder a file named template-commissie.php. Coded is now:
<?php /* Template Name: Commissie */ get_header(); get_template_part('templates/page', 'header'); ?> <div wrap> <div id="content" class="container"> <div class="row"> <div class="main <?php echo esc_attr( pinnacle_main_class() );?>" role="main"> <div class="entry-content" itemprop="mainContentOfPage"> <?php get_template_part('templates/content', 'page'); ?> </div><!-- /.entry-content--> </div><!-- /.main--> <?php get_sidebar(); ?> </div><!-- /.row--> </div><!-- /.content --> </div><!-- /.wrap --> <?php get_footer(); ?>
An example of one of the pages which will be using this template, is test.mebiose.nl/vereniging/commissies/galacommissie.
Which template parts do I need to get?
- The topic ‘Custom Template with Blog & Portfolio on same page’ is closed to new replies.