I’m interesed too 🙂
Don’t understand how to use the reset_rows()
Can somebody paste here a example?
Thank you Dennis!
But neither works.
I have still searching and find a thing probably can resolve this.
First explain some things:
I used a sports plugin who create a events template, but I need customize this templates and use ACF for this.
The thing I find was this:
public function event_content( $content ) {
if ( is_singular( 'sp_event' ) )
$content = self::add_content( $content, 'event', apply_filters( 'sportspress_event_content_priority', 10 ) );
return $content;
}
the plugin is loading things on the content, how i can add here my code? is possible?
I tried to disable this and use only the code of sp-events.php but don´t work.
thank you a lot!
Now if i use <?php the_content();?>
this should show the added content?
I try this but don’t show nothing yet
Sorry, but I don’t understand the problem in this code, the endif;
is in the line 141.
Is very probably I have some error in this template, i don’t know php…
Yes sure i deleted this.
Here a link to see the template code.
But i think the problem probably was open the { into another php tag. Can be this the problem?
The same problem… dont fix the error.
When i try to load the page only display me this error:
Parse error: syntax error, unexpected ‘}’ in /home3/*****/public_html/wp-content/themes/******/single-event.php on line 282
I don’t know why, but don’t work, sen me a error in the } before $content .= ob_get_clean();
i paste you here the start and the end of code
START
<?php add_filter( 'the_content', 'contenido_events_add', 0 );
function contenido_events_add( $content ) {
if ($post->post_type == 'sp-event')
global $post;
ob_start();
?>
<div class="row">
... and the rest of the html
... and field you want to add to content
END
<?php
$content .= ob_get_clean();
}
return $content
}
?>
This don’t work but i think is near to te solution, probably if you don’t check the code I pasted before this can be whit some error.
Thank you!
Thank you for your fast response!!
I see other option using some code like this:
add_filter( 'the_content', 'my_the_content_filter', 0 );
function my_the_content_filter( $content ) {
if ( is_single() )
{
global $post;
$pgLnk=get_post_meta($post->ID, 'Button', true);
$content .= 'CODE WHAT U WANT TO ADD HERE';
}
return $content;
}
but I don’t know how implement my code here, or if is posible…
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.