Unfortunately I found out that depends on the functions that I have added to my website.
Functions can be found here:
https://wordpress.org/support/topic/how-can-i-show-the-fields-of-acf?replies=1#post-6825697
Lets say I have found out the cause but have not solved the problem.
Mmm weird, you have the title two times but no content in it…
I thought I had solved but the page is still blank.
If I remove the function mentioned above, it all works wonderfully.
There is some line of code that is not good
Hi,
the developer of ACF wrote:
“Your code looks just fine.
However, please note that the get_field() function expected a second parameter which is the post id.
In cases where it is not set it takes the global post id.
Kindly investigate on that and let me know.”
I noticed that the cause is the code which serves to place the custom fields in the articles:
https://gist.github.com/anonymous/1f10aa926d28a62a99a9#file-acf_the_content_filter-php
Hi,
enable wp_debug and see what’s the error you get.
https://codex.wordpress.org/it:WP_DEBUG
It does not appear any error.
Non appare alcun errore.
In poche parole: quella parte di codice, sopra menzionata, causa la scomparsa dei contenuti nelle pagine (post_type: page).
Usando la precedente porzione di codice:
add_action('__before_content','my_acf',100);
function my_acf() {
if ( ! is_single() )
return;
//code here
}
Le pagine funzionano bene.
Purtroppo a me serve che il gruppo dei field appaia nell’articolo.
PS: Scusa se scrivo in italiano, ma Γ¨ il modo migliore per farmi capire.
Since there is no solution, I put again the following code:
add_action('__before_content','my_acf',100);
function my_acf() {
if ( ! is_single() )
return;
//code here
}
Unfortunately, there is another problem …
Look at this post and click on the first image:
http://www.oltrezine.com/blog/batman-vita-dopo-la-morte-by-spider-ci/
Lightbox not working π
Mmm,
sorry, totally missed your reply.
The lightbox works if the image is part of the content.
So use again the code with “the_content” filter, and instead of :
if ( ! is_single() )
return;
use
if ( ! is_single() )
return $content;
Sorry, was my fault π
Hi d4z_c0nf,
thank you so much, you’re the best!!
Eheh thanks man,
and thanks for the patience π
Glad you solved.