Amy-Mir / global-templates / blog-head.php
blog-head.php
Raw
<?php 
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;

$slug = get_page_by_path( 'posts' ); 

$post_id = $slug->ID; 

$hero_section_cover = get_field('posts_page_cover_section', $post_id);

?>

<section class="hero">
    <?php
        $hero_args = array(
        'image'     => $hero_section_cover,
        'pageTitle' => $args,
        ); 
        get_template_part('global-templates/cover', null, $hero_args); ?>
</section>

<?php get_template_part( 'loop-templates/posts', 'carousel'); ?>

<section class="S01 container p-t-5">
    <?php get_template_part("loop-templates/blog", "categories"); ?>
</section>

<div class="page__title container p-t-5">
    <h1 class="btnText__lg">Siste innlegg</h1>
    <hr>
</div>