Skip to content

Instantly share code, notes, and snippets.

@tibicostan
Created March 21, 2016 17:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tibicostan/390a4093880f020dd678 to your computer and use it in GitHub Desktop.
Save tibicostan/390a4093880f020dd678 to your computer and use it in GitHub Desktop.
<?php get_header() ?>
<?php
global $porto_settings, $porto_layout;
wp_reset_postdata();
?>
<div id="content" role="main">
<?php if (have_posts()) : the_post();
$post_layout = get_post_meta($post->ID, 'post_layout', true);
$post_layout = ($post_layout == 'default' || !$post_layout) ? $porto_settings['post-content-layout'] : $post_layout;
?>
<?php get_template_part('content', 'post-' . $post_layout); ?>
<?php
if ($porto_settings['post-related']) :
$related_posts = porto_get_related_posts($post->ID);
if ($related_posts->have_posts()) : ?>
<?php endif;
endif;
endif; ?>
</div>
<?php get_footer() ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment