PHP Experts for the_excerpt
-
May be a difficult problem for someone who does not support PHP:
output in a list THE EXCERPT instead of the category for costum post type in a list.This is regulated in a PHP file:
$terms = wp_get_post_terms(get_the_ID(), 'portfolio_category'); $k = 1; foreach ($terms as $term) { $html .= "$term->name"; if (count($terms) != $k) { $html .= ', '; } $k++; }Works fine. But I cant change it to the post excerpt with this. It works, but spits all content of all posts of “portfolio_category” and the excerpts out:
$my_excerpt = get_the_excerpt(); if ( $my_excerpt != '' ) { / Some string manipulation performed } echo $my_excerpt;What is to do?
Thanks a lot!Mark from Hamburg, Germany
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘PHP Experts for the_excerpt’ is closed to new replies.