File: /var/www/tana/wp-content/themes/tana/home.php
<?= get_header() ?>
<div class="container">
<div class="row">
<div class="col-xs-12">
<div class="row">
<div class="col-sm-2">
<a href="<?= home_url() ?>">
<?php
$logo = get_field( 'page_logotype' );
?>
<img class="logo--secondary img-responsive center-block" src="<?= $logo['url'] ?>" alt="<?= $logo['alt'] ?>">
</a>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-2 sticky-follow">
<div>
<div>
<a href="./">
<img class="logo--secondary img-responsive center-block" src="<?= $logo['url'] ?>" alt="<?= $logo['alt'] ?>">
</a>
</div>
<ul class="list list--unstyled list-categories list-categories--pretty">
<li class="list-categories__item list-categories__item--active">All</li>
<?php
$categories = get_terms( 'category' );
foreach( $categories as $category ) :
?>
<li class="list-categories__item" data-type="<?= $category->term_id ?>"><?= $category->name ?></li>
<?php endforeach; ?>
</ul>
</div>
</div>
<div class="col-sm-10">
<div class="results-container">
<div class="articles-grid">
<div class="row">
<div class="col-sm-6 col-md-8 faded">
<?php
$featured = get_field( 'featured_post', 'option' );
if( $featured == 'latest' ) :
$_post = new WP_Query(array(
'posts_per_page' => 1,
'orderby' => 'publish_date',
'order' => 'ASC'
));
if( $_post->have_posts() ) :
while( $_post->have_posts() ) :
$_post->the_post();
$first = $_post->posts[0]->ID;
require_once( get_template_directory() . '/partials/post-short.php' );
endwhile;
endif;
elseif( $featured == 'choose' ) :
$_post = get_field( 'choose_featured_post', 'option' );
if( $_post ) :
$post = $_post;
$first = $post->ID;
setup_postdata( $post );
require_once( get_template_directory() . '/partials/post-short.php' );
wp_reset_postdata();
endif;
endif;
?>
</div>
<?php
$_posts = new WP_Query(array(
'posts_per_page' => -1,
'orderby' => 'publish_date',
'order' => 'ASC',
'post__not_in' => array( $first )
));
if( $_posts->have_posts() ) :
while ( $_posts->have_posts() ) :
$_posts->the_post();
?>
<div class="col-sm-6 col-md-4 faded">
<?php include( get_template_directory() . '/partials/post-short.php' ); ?>
</div>
<?php
endwhile;
wp_reset_postdata();
endif;
?>
</div>
</div>
<div class="links-grid hidden">
<div class="row">
<div class="col-md-4">
<div class="links-grid__single">
<h4 class="links-grid__single-title">Albania</h4>
<ul class="list list--unstyled links-grid__single-list">
<li>
<a href="#">Albanian domain name registry</a>
</li>
<li>
<a href="#">Albanian patent office</a>
</li>
</ul>
</div>
<div class="links-grid__single">
<h4 class="links-grid__single-title">Bosnia-Herzegovina</h4>
<ul class="list list--unstyled links-grid__single-list">
<li>
<a href="#">Intellectual Property Institute of Bosnia-Herzegovina</a>
</li>
<li>
<a href="#">UTIC – top level .ba domain names</a>
</li>
</ul>
</div>
<div class="links-grid__single">
<h4 class="links-grid__single-title">Croatia</h4>
<ul class="list list--unstyled links-grid__single-list">
<li>
<a href="#">CARNet – top level .hr domain names</a>
</li>
<li>
<a href="#">Croatian Customs Authority</a>
</li>
<li>
<a href="#">State Inspectorate of the Republic of Croatia</a>
</li>
<li>
<a href="#">The Croatian State Intellectual Property Office</a>
</li>
</ul>
</div>
</div>
<div class="col-md-4">
<div class="links-grid__single">
<h4 class="links-grid__single-title">Kosovo</h4>
<ul class="list list--unstyled links-grid__single-list">
<li>
<a href="#">Kosovo IP office</a>
</li>
<li>
<a href="#">The Assembly of Kosovo</a>
</li>
</ul>
</div>
<div class="links-grid__single">
<h4 class="links-grid__single-title">Macedonia</h4>
<ul class="list list--unstyled links-grid__single-list">
<li>
<a href="#">Customs Administration of the Republic of Macedonia</a>
</li>
<li>
<a href="#">The Macedonian State Office of Industrial Property</a>
</li>
</ul>
</div>
<div class="links-grid__single">
<h4 class="links-grid__single-title">Montenegro</h4>
<ul class="list list--unstyled links-grid__single-list">
<li>
<a href="#">Intellectual Property Office of Montenegro</a>
</li>
<li>
<a href="#">Montenegro - top level .me domain names</a>
</li>
</ul>
</div>
</div>
<div class="col-md-4">
<div class="links-grid__single">
<h4 class="links-grid__single-title">Serbia</h4>
<ul class="list list--unstyled links-grid__single-list">
<li>
<a href="#">Republic of Serbia Customs Administration</a>
</li>
<li>
<a href="#">Republic of Serbia Intellectual Property Office</a>
</li>
<li>
<a href="#">RNIDS – Serbian internet domain name registry</a>
</li>
</ul>
</div>
<div class="links-grid__single">
<h4 class="links-grid__single-title">Slovenia</h4>
<ul class="list list--unstyled links-grid__single-list">
<li>
<a href="#">ARNES – Slovenian domain name registry</a>
</li>
<li>
<a href="#">Customs Administration of the Republic of Slovenia</a>
</li>
<li>
<a href="#">The Slovenian Intellectual Property Office</a>
</li>
</ul>
</div>
<div class="links-grid__single">
<h4 class="links-grid__single-title">International</h4>
<ul class="list list--unstyled links-grid__single-list">
<li>
<a href="#">European Patent Organization</a>
</li>
<li>
<a href="#">The Office of Harmonization for the Internal Market (EU)</a>
</li>
<li>
<a href="#">World Intellectual Property Office</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="content-wrapper-second">
</div>
</div>
<?= get_footer() ?>