Get Excerpt from an Advanced Custom Field ACF April 9, 2014Advanced Custom Fields, WordPressacrane Place in your functions file: Make sure to change “your_field_name”. Use in your template:
Carlos Arellano May 5, 2015 at 12:23 am Really nice code!! i got a question though, its possible insert the permalink into the […]? thanks again!! Carlos.-
acrane May 5, 2015 at 2:13 pm Sure, you would just need to get the permalink and then wrap it in the link. Add a new line to the function: $permalink = get_permalink($post->ID); That gives you the permalink. Then change the line that starts with $excerpt_more to: $excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');
Thanks for this code.
Really nice code!! i got a question though, its possible insert the permalink into the […]?
thanks again!!
Carlos.-
Sure, you would just need to get the permalink and then wrap it in the link. Add a new line to the function:
That gives you the permalink. Then change the line that starts with $excerpt_more to:
$text = get_field(‘question_1’); //Replace ‘your_field_name’