Hi man, I reckon you could translate it through WPML.
I solved (partially) in the end. It’s possible doing this through the WordPress Importer using an XML. It is pulling through the front-end but it is not in the CMS instead.
Hi,
if you’re trying to get the custom field value you should just echo it like this:
<?php $var = get_the_field('your-custom-field'); ?> <p><?php echo $var; ?></p>
Does it help?
Can you share the code you are using to pull your custom fields in the front end? You should echo the custom fields like this:
<?php $var = get_the_field('my-custom-field'); ?> <p><?php echo $var; ?></p>
Hi Man, I think there is a syntax error in your code. You should check whether there is a field or not (as you’ve done) but you should even check if there are rows
. Also when you echo a sub_field sticking it in a variable use
get_the_sub_field()
. So try the code below and let me know if that’s what you’re looking for 🙂
<div class="entry-content"> <?php the_content(); ?> <?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'pictorico' ), 'after' => '</div>', ) ); ?> <?php if(get_field('spalten')): ?> <?php while(have_rows('spalten')): the_row(); ?> <div class="columns"> <div class="col-left"><?php $wysiwyg = get_the_sub_field('linke_spalte', false, false); echo apply_filters('the_content', $wysiwyg); ?></div> <div class="col-right"><?php $wysiwyg = get_the_sub_field('rechte_spalte', false, false); echo apply_filters('the_content', $wysiwyg); ?></div> </div> <?php endwhile; ?> <?php endif; ?> </div><!-- .entry-content -->
Also you probably need to make sure there are posts to display so at the very top of it you should do something like:
<?php if(have_posts() ) { while ( have_posts() ) { the_post(); ?>
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.