mirror of
https://github.com/ascribe/wp-theme
synced 2024-12-22 17:23:55 +01:00
get blog url the right way
This commit is contained in:
parent
4d4c719dac
commit
7a14aa09aa
@ -369,6 +369,8 @@ class Subtemplate {
|
|||||||
$content = substr($feature->post_content, 0, 144) . '...';
|
$content = substr($feature->post_content, 0, 144) . '...';
|
||||||
$date = date('F Y', strtotime($feature->post_date));
|
$date = date('F Y', strtotime($feature->post_date));
|
||||||
$image = wp_get_attachment_image_src(get_post_thumbnail_id($feature->ID),'blog-feature-crop')[0];
|
$image = wp_get_attachment_image_src(get_post_thumbnail_id($feature->ID),'blog-feature-crop')[0];
|
||||||
|
$blogPage = get_page_by_title('Blog');
|
||||||
|
$blogUrl = get_permalink($blogPage->ID);
|
||||||
|
|
||||||
$blogFeatures .= "<div class='grid__col'>
|
$blogFeatures .= "<div class='grid__col'>
|
||||||
<a href='{$url}'>
|
<a href='{$url}'>
|
||||||
@ -383,10 +385,10 @@ class Subtemplate {
|
|||||||
|
|
||||||
$result = "<section class='subtemplate row subtemplate--featured'>
|
$result = "<section class='subtemplate row subtemplate--featured'>
|
||||||
<h1 class='subtemplate__title'>{$subtemplateTitle}</h1>
|
<h1 class='subtemplate__title'>{$subtemplateTitle}</h1>
|
||||||
<div class='grid grid--gutters grid--full grid-small--fit'>
|
<div class='grid grid--gutters grid--half grid-small--fit'>
|
||||||
{$blogFeatures}
|
{$blogFeatures}
|
||||||
</div>
|
</div>
|
||||||
<p class='subtemplate--featured--more'><a class='button small white-blue' href=''>Go to Blog</a></p>
|
<p class='subtemplate--featured--more'><a class='button small white-blue' href='{$blogUrl}'>Go to Blog</a></p>
|
||||||
</section>";
|
</section>";
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
|
Loading…
Reference in New Issue
Block a user