Other plugin cannot show post title on featured image
-
Hi,
I use this plugin to add a default featured image and use other plugin to add post title covered on featured image. However post title not work if default featured image automatically applied. How can I fix it?Not knowing if its helpful but below is part of code from other plugin:
function splitTitle($title) { $titles = explode(",", $title); if(count($titles)>1) return "{$titles[0]} <br/> {$titles[1]}"; else return $title; } // add post title function testFilter($html){ global $post; return '<div class="feature-parent">' . $html . '<p class="feature-title">' . splitTitle(get_the_title()) . '</p></div>'; } add_filter( 'post_thumbnail_html', 'testFilter'); //add css
The page I need help with: [log in to see the link]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Other plugin cannot show post title on featured image’ is closed to new replies.