Front page sections have dynamic links
This commit is contained in:
parent
4d217b25bf
commit
49c74c2b6c
@ -79,7 +79,11 @@
|
|||||||
</section>
|
</section>
|
||||||
<!-- TECH SECTION -->
|
<!-- TECH SECTION -->
|
||||||
<section class="st-article-section st-article-section-bottom">
|
<section class="st-article-section st-article-section-bottom">
|
||||||
<h2 class="st-article-section-title">Tech <a href="<?php echo home_url() . '/tech'; ?>" class="st-article-section-category-link">></a></h2>
|
<?php
|
||||||
|
$section_category = 'Tech';
|
||||||
|
$section_category_id = get_cat_ID( $section_category );
|
||||||
|
?>
|
||||||
|
<h2 class="st-article-section-title"><?php echo $section_category; ?> <a href="<?php echo get_category_link( $section_category_id ); ?>" class="st-article-section-category-link">></a></h2>
|
||||||
<?php
|
<?php
|
||||||
$section_category = 'Tech';
|
$section_category = 'Tech';
|
||||||
$post_section_three_featured_args = array(
|
$post_section_three_featured_args = array(
|
||||||
@ -146,16 +150,16 @@
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section class="st-newsletter-signup">
|
|
||||||
<!-- MORE STUFF HERE -->
|
|
||||||
</section>
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- FLAT HORIZONTAL SECTION HERE -->
|
<!-- FLAT HORIZONTAL SECTION HERE -->
|
||||||
<section class="st-article-section st-article-section-wide">
|
<section class="st-article-section st-article-section-wide">
|
||||||
<h2 class="st-article-section-title">Gravel <a href="<?php echo home_url() . '/articles'; ?>" class="st-article-section-category-link">></a></h2>
|
|
||||||
<?php
|
<?php
|
||||||
$section_category = 'Gravel';
|
$section_category = 'Gravel';
|
||||||
|
$section_category_id = get_cat_ID( $section_category );
|
||||||
|
?>
|
||||||
|
<h2 class="st-article-section-title"><?php echo $section_category; ?><a href="<?php echo get_category_link( $section_category_id ); ?>" class="st-article-section-category-link">></a></h2>
|
||||||
|
<?php
|
||||||
$post_section_three_featured_args = array(
|
$post_section_three_featured_args = array(
|
||||||
'showposts' => 4,
|
'showposts' => 4,
|
||||||
'category_name' => $section_category,
|
'category_name' => $section_category,
|
||||||
@ -164,7 +168,7 @@
|
|||||||
'post_type' => 'post',
|
'post_type' => 'post',
|
||||||
'post_status' => 'publish'
|
'post_status' => 'publish'
|
||||||
);
|
);
|
||||||
query_posts($post_section_three_featured_args);
|
query_posts( $post_section_three_featured_args );
|
||||||
if (have_posts()) : while (have_posts()) : the_post();
|
if (have_posts()) : while (have_posts()) : the_post();
|
||||||
$category = get_the_category()[0];
|
$category = get_the_category()[0];
|
||||||
?>
|
?>
|
||||||
@ -189,9 +193,12 @@
|
|||||||
<!-- LATEST SECTION -->
|
<!-- LATEST SECTION -->
|
||||||
<section class="st-article-section-grid">
|
<section class="st-article-section-grid">
|
||||||
<section class="st-article-section st-article-section-highlight">
|
<section class="st-article-section st-article-section-highlight">
|
||||||
<h2 class="st-article-section-title">Lifestyle <a href="<?php echo home_url() . '/articles'; ?>" class="st-article-section-category-link">></a></h2>
|
|
||||||
<?php
|
<?php
|
||||||
$section_category = 'Lifestyle';
|
$section_category = 'Lifestyle';
|
||||||
|
$section_category_id = get_cat_ID( $section_category );
|
||||||
|
?>
|
||||||
|
<h2 class="st-article-section-title"><?php echo $section_category; ?> <a href="<?php echo get_category_link( $section_category_id ); ?>" class="st-article-section-category-link">></a></h2>
|
||||||
|
<?php
|
||||||
$post_section_three_featured_args = array(
|
$post_section_three_featured_args = array(
|
||||||
'showposts' => 1,
|
'showposts' => 1,
|
||||||
'category_name' => $section_category,
|
'category_name' => $section_category,
|
||||||
@ -274,9 +281,12 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="st-article-section st-article-section-bottom">
|
<section class="st-article-section st-article-section-bottom">
|
||||||
<h2 class="st-article-section-title">Opinion <a href="<?php echo home_url() . '/tech'; ?>" class="st-article-section-category-link">></a></h2>
|
<?php
|
||||||
<?php
|
|
||||||
$section_category = 'Opinion';
|
$section_category = 'Opinion';
|
||||||
|
$section_category_id = get_cat_ID( $section_category );
|
||||||
|
?>
|
||||||
|
<h2 class="st-article-section-title"><?php echo $section_category; ?> <a href="<?php echo get_category_link( $section_category_id ); ?>" class="st-article-section-category-link">></a></h2>
|
||||||
|
<?php
|
||||||
$post_section_three_featured_args = array(
|
$post_section_three_featured_args = array(
|
||||||
'showposts' => 1,
|
'showposts' => 1,
|
||||||
'category_name' => $section_category,
|
'category_name' => $section_category,
|
||||||
@ -347,9 +357,12 @@
|
|||||||
</section>
|
</section>
|
||||||
<!-- FLAT HORIZONTAL SECTION HERE -->
|
<!-- FLAT HORIZONTAL SECTION HERE -->
|
||||||
<section class="st-article-section st-article-section-wide">
|
<section class="st-article-section st-article-section-wide">
|
||||||
<h2 class="st-article-section-title">Race Reports <a href="<?php echo home_url() . '/articles'; ?>" class="st-article-section-category-link">></a></h2>
|
|
||||||
<?php
|
<?php
|
||||||
$section_category = 'race-reports';
|
$section_category = 'Race Reports';
|
||||||
|
$section_category_id = get_cat_ID( $section_category );
|
||||||
|
?>
|
||||||
|
<h2 class="st-article-section-title"><?php echo $section_category; ?> <a href="<?php echo get_category_link( $section_category_id ); ?>" class="st-article-section-category-link">></a></h2>
|
||||||
|
<?php
|
||||||
$post_section_three_featured_args = array(
|
$post_section_three_featured_args = array(
|
||||||
'showposts' => 4,
|
'showposts' => 4,
|
||||||
'category_name' => $section_category,
|
'category_name' => $section_category,
|
||||||
|
Loading…
Reference in New Issue
Block a user