Forum Replies Created
-
AuthorPosts
-
That centers the description only. Use the following to center all text: name, job title etc.
.avia-team-member { text-align: center; }
Thank you Ismael – works perfectly
I’m getting a syntax error on this line:
if ( has_post_thumbnail( $post->ID || $contentmod ) {
That works great but when I add a custom field the thumbnail disappears in the feed.
Is there a way I can include the custom field and the thumbnail image in the RSS feed?I tried like this but it only shows one or the other not both:
//add custom field – feed – to feed for portfolio
function avia_add_images_to_rss_feed($content)
{
global $post;
if ( has_post_thumbnail( $post->ID ) ){
$content = ‘<p>’ . get_the_post_thumbnail( $post->ID, ‘medium’ ) . ‘</p>’ . get_the_excerpt();}$contentmod = get_post_meta( $post->ID, ‘feed’, true );
if ( $contentmod ) { $content = $contentmod; }
return $content;
}add_filter(‘the_excerpt_rss’, ‘avia_add_images_to_rss_feed’);
add_filter(‘the_content_feed’, ‘avia_add_images_to_rss_feed’);Thanks Ismael. How can I enable custom fields for Portfolio? (not available under screen options)
You rock! Thanks Eliott
-
AuthorPosts