Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Before describing the problem, let me first tell that I have already searched on google, also read the ACF documentation, support, even asked on their support forum but it's hard to get any kind of answer there.

So the thing is I have this wysiwyg on a custom post type I made where I have an item description, I really don't want to use the wp default editor because I designed a structure on the post to be more user friendly.

The problem comes when I add the tag to the field, it will not work as the_content('Read More') for example, I have tried to find out but failed. I'm using the

<?php
global $more 
$more = 0;
?>

but then if I want to use like for example:

<?php the_field('the_field_name','Read More')?>

it will not show the More tag.

What can I do to display it?

share|improve this question
1  
¿ Where did you got that the_field or get_field can have the second parameter of "Read More" ? - advancedcustomfields.com/docs/functions/get_field –  brasofilo Dec 2 '12 at 0:54
add comment

1 Answer

Simply go and apply the default filter:

// You´ll likely need a function that doesn´t echo/print the output to get this working
// without an error
echo apply_filters( 'the_excerpt', get_field( 'YOUR_FIELD_NAME', get_the_ID() ) );
share|improve this answer
    
Assuming this works, you can use get_field() to avoid the echo. –  mrwweb Apr 26 '12 at 16:01
    
Hi kaiser, thanks for your answer, unluckily when I paste it into my code it doesn't show anything. –  Jaypee Apr 26 '12 at 16:02
    
btw, of course I changed 'the_field_name' to my field name. –  Jaypee Apr 26 '12 at 16:03
    
Hi kaiser, thanks again for trying to help me. Pasted the code, replaced the field name with mine, nothing happens :( Should I include the <?php global $more; $more = 0; ?> –  Jaypee Apr 26 '12 at 16:36
    
Hi again, I removed the $more, and I'm 100% sure I'm typing the field_name correctly. Nothing is shown. –  Jaypee Apr 26 '12 at 17:05
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.