Tagged: custom fields, enfold, overline, subheading
Hi,
I’ve introduced a custom field to show an overline / deck head above a post’s heading (variable name $dachzeile) instead of the category name.
Works fine on the post page itself – I managed to add this code snippet to loop-index.php:
$dachzeile = get_post_meta($post->ID, 'dachzeile', true);
if($dachzeile != '') { echo '<div class="dachzeile">' . $dachzeile . '</div>'; }
else { echo '<div class="dachzeile">'; the_category(' / '); echo '</div>';}
However, I struggle to modify postslider.php in the correct way.
Tried to modify the line with h3 like this …
$output .= "<div class='dachzeile_startseite'>".$dachzeile."</div><h3 class='slide-entry-title entry-title' $markup><a href='{$link}' title='".esc_attr(strip_tags($title))."'>".$title."</a></h3>";
… (fallback option from above not implemented yet), but the value of the custom field does not appear.
Thanks!
Hey fmg,
Can you try to post the whole code in http://pastebin.com/index.php and give the link to us, so we can check. As for the overlines, I’m not really sure what you meant, is it the one with purple background? I can’t see any on the 2nd link.
Best regards,
Nikko