Skip to content
This repository has been archived by the owner. It is now read-only.

Update to external urls and blank pages #1

Merged
merged 1 commit into from
Mar 11, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion content-presspage-headline-only.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
<header class="entry-header">
<h4 class="entry-title">
<?php
if(strlen(get_the_content()) > 0) {
$external_link = get_post_meta(get_the_ID(),'external_link');
if(strlen(get_the_content()) > 0 || !empty($external_link)) {
echo'<a href="'.$presslink.'">'.get_the_title().'</a>';
} else {
the_title();
Expand Down
5 changes: 3 additions & 2 deletions content-presspage-large-image-and-headline.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
<header class="entry-header">
<?php $presslink = press_link(get_the_ID());?>
<?php
if(strlen(get_the_content()) > 0 && has_post_thumbnail()) {
$external_link = get_post_meta(get_the_ID(),'external_link');
if((strlen(get_the_content()) > 0 || !empty($external_link)) && has_post_thumbnail()) {
echo'<a href="'.$presslink.'">'.get_the_post_thumbnail().'</a>';
} elseif(has_post_thumbnail()) {
the_post_thumbnail();
}
?>
<h4 class="entry-title">
<?php
if(strlen(get_the_content()) > 0) {
if(strlen(get_the_content()) > 0 || !empty($external_link)) {
echo'<a href="'.$presslink.'">'.get_the_title().'</a>';
} else {
the_title();
Expand Down
5 changes: 3 additions & 2 deletions content-presspage-small-image-and-headline.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
<div class="row">
<div class="col-sm-5">
<?php
if(strlen(get_the_content()) > 0 && has_post_thumbnail()) {
$external_link = get_post_meta(get_the_ID(),'external_link');
if((strlen(get_the_content()) > 0 || !empty($external_link)) && has_post_thumbnail()) {
echo'<a href="'.$presslink.'">'.get_the_post_thumbnail().'</a>';
} elseif(has_post_thumbnail()) {
the_post_thumbnail();
Expand All @@ -14,7 +15,7 @@
<header class="entry-header">
<h4 class="entry-title">
<?php
if(strlen(get_the_content()) > 0) {
if(strlen(get_the_content()) > 0 || !empty($external_link)) {
echo'<a href="'.$presslink.'">'.get_the_title().'</a>';
} else {
the_title();
Expand Down
5 changes: 3 additions & 2 deletions content-presspage-top.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
<div class="row">
<div class="col-sm-6">
<?php
if(strlen(get_the_content()) > 0 && has_post_thumbnail()) {
$external_link = get_post_meta(get_the_ID(),'external_link');
if((strlen(get_the_content()) > 0 || !empty($external_link)) && has_post_thumbnail()) {
echo'<a href="'.get_the_permalink().'">'.get_the_post_thumbnail().'</a>';
} elseif(has_post_thumbnail()) {
the_post_thumbnail();
Expand All @@ -16,7 +17,7 @@
<header class="entry-header">
<h4 class="entry-title">
<?php
if(strlen(get_the_content()) > 0) {
if(strlen(get_the_content()) > 0 || !empty($external_link)) {
echo'<a href="'.get_the_permalink().'">'.get_the_title().'</a>';
} else {
the_title();
Expand Down