Skip to content

Commit

Permalink
minor updates to the display of search results
Browse files Browse the repository at this point in the history
  • Loading branch information
kasprzyk-sz committed Nov 15, 2022
1 parent 2887073 commit 7135cde
Showing 1 changed file with 9 additions and 17 deletions.
26 changes: 9 additions & 17 deletions wp-content/themes/vf-wp-intranet/partials/vf-summary--page.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,20 @@
}

if ( get_post_type() == 'insites') {
echo '<b>News</b> | ';
echo '<b>News</b>';
}
if ( get_post_type() == 'documents') {
echo '<b>Document</b> | ';
echo '<b>Document</b>';
}
if ( get_post_type() == 'events') {
echo '<b>Event</b>';
}

if ((get_post_type() == 'page') || (get_post_type() == 'teams')) {
echo '<b>Page</b>';
}
if (has_excerpt()) {
if ( get_post_type() == 'page') {
echo '<b>Page</b> | ' . get_the_excerpt();
echo ' | ' . get_the_excerpt();
}
else {
echo get_the_excerpt();
}
}
else {
$content = strip_tags(get_the_content());
if ($content != '') {
Expand All @@ -50,21 +47,16 @@
$content = $endPoint? substr($contentCut, 0, $endPoint) : substr($contentCut, 0);
$content .= '...';
}
echo '<b>Page</b> | ' . $content;
echo ' | ' . $content;
}
else {
if ( get_post_type() == 'page') {
echo '<b>Page</b>';
} }
}
}
?>
</p>

<?php
if ( (get_post_type() == 'page') || (get_post_type() == 'teams')) {
if (!empty($redirect_url)) { ?>
<div class="vf-summary__meta"><a href="<?php echo esc_url($redirect_url); ?>"
class="vf-summary__author vf-summary__link"><?php echo esc_url($redirect_url); ?></a></div>
<div class="vf-summary__meta"><p class="vf-summary__author"><?php echo esc_url($redirect_url); ?></p></div>
<?php }
else { ?>
<div class="vf-summary__meta"><?php
Expand Down

0 comments on commit 7135cde

Please sign in to comment.