Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 67836

Use post excerpt as caption?

$
0
0

Replies: 0

Is it possible to insert the “post excerpt” in the caption?

I’m currently using a method from a contributer and it works great:

$tags	= get_the_tags($ID);
 $tagged = '';
 if ( $tags ) {
 foreach ( $tags as $tag ) { $tagged[] = rawurlencode($tag->name); }
 $tagged = implode('#',$tagged);
 }
 $caption = get_the_title($ID)."\n".home_url('?p='.$ID)."\n#".$tagged;     // caption

I’m wondering if it would be possible to add the “post excerpt” as well? Thanks in advance.


Viewing all articles
Browse latest Browse all 67836

Trending Articles