projects
/
WP-Themes
/
mackinawareavb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2217a8b
)
checking to see if the page has an excerpt before trying to access it
author
Anthony Talarico
<talarico@gaslightmedia.com>
Fri, 16 Dec 2016 14:00:15 +0000
(09:00 -0500)
committer
Anthony Talarico
<talarico@gaslightmedia.com>
Fri, 16 Dec 2016 14:00:15 +0000
(09:00 -0500)
to prevent getting the page content instead
sections/top-bar.php
patch
|
blob
|
history
diff --git
a/sections/top-bar.php
b/sections/top-bar.php
index
a929638
..
4ca2206
100644
(file)
--- a/
sections/top-bar.php
+++ b/
sections/top-bar.php
@@
-34,7
+34,12
@@
foreach($post_data as $pd=>$value){
$image = false;
}
$image = wp_get_attachment_image_src( get_post_thumbnail_id( $value->ID ), array(300,250) );
- $dropdown[$value->ID]['excerpt'] = get_the_excerpt($value->ID);
+ if (has_excerpt($value->ID) ){
+ $dropdown[$value->ID]['excerpt'] = get_the_excerpt($value->ID);
+ } else {
+ $dropdown[$value->ID]['excerpt'] = " ";
+ }
+
$dropdown[$value->ID]['menu'] = $pd;
}