WordPress.org

Ready to get started?Download WordPress

Forums

Advanced Custom Fields
Using ACF and WPML on php (1 post)

  1. serviceweb
    Member
    Posted 1 year ago #

    Hello,

    i have a website with three language (italian, english and spanish) and i use ACF for custom field. I have create all field in all language and i put this code on my single.php file:

    <div class="info">
              <p><span class="list">
                <?php if ( get_post_meta( get_the_ID(), 'indirizzo', true ) ) : ?>
    			<?php _e( 'Indirizzo: '); ?>
                </span>
                <?php the_field('indirizzo'); ?><?php endif; ?>
              </p>
              <p><span class="list">
                <?php if ( get_post_meta( get_the_ID(), 'address', true ) ) : ?>
    			<?php _e( 'Address: '); ?></span>
                <?php the_field('address'); ?><?php endif; ?>
              </p>
              <p><span class="list">
                <?php if ( get_post_meta( get_the_ID(), 'endereco', true ) ) : ?>
    			<?php _e( 'Endereco: '); ?>
                </span>
                <?php the_field('endereco'); ?><?php endif; ?>
              </p>
                 <p><span class="list">
                <?php if ( get_post_meta( get_the_ID(), 'telefono', true ) ) : ?>
    			<?php _e( 'Telefono: '); ?>
                </span>
                <?php the_field('telefono'); ?><?php endif; ?>
              </p>
                 <p><span class="list">
                <?php if ( get_post_meta( get_the_ID(), 'phone', true ) ) : ?>
    			<?php _e( 'Telephone: '); ?>
                </span>
                <?php the_field('phone'); ?><?php endif; ?>
              </p>
                 <p><span class="list">
                <?php if ( get_post_meta( get_the_ID(), 'telefone', true ) ) : ?>
    			<?php _e( 'Telefone: '); ?>
                </span>
                <?php the_field('telefone'); ?><?php endif; ?>
              </p>
                <p><span class="list">
                <?php if ( get_post_meta( get_the_ID(), 'email', true ) ) : ?>
    			<?php _e( 'Email: '); ?>
                </span> <a href="mailto:<?php the_field('email'); ?>">
                <?php the_field('email'); ?><?php endif; ?>
                </a></p>
              <p><span class="list">
                <?php if ( get_post_meta( get_the_ID(), 'sitoweb', true ) ) : ?>
    			<?php _e( 'Sito Web: '); ?>
                </span> <a href="http://<?php the_field('sitoweb'); ?>">
                <?php the_field('website'); ?>
                </a><?php endif; ?></p>
              <p><span class="list">
                <?php if ( get_post_meta( get_the_ID(), 'website', true ) ) : ?>
    			<?php _e( 'Website: '); ?>
                </span> <a href="http://<?php the_field('website'); ?>">
                <?php the_field('website'); ?>
                </a><?php endif; ?></p>
              <p><span class="list">
                <?php if ( get_post_meta( get_the_ID(), 'site', true ) ) : ?>
    			<?php _e( 'Site: '); ?>
                </span> <a href="http://<?php the_field('site'); ?>">
                <?php the_field('website'); ?>
                </a><?php endif; ?></p>
                <p><span class="list">
                <?php if ( get_post_meta( get_the_ID(), 'facebook', true ) ) : ?>
    			<?php _e( 'Facebook: '); ?>
                </span> <a href="<?php the_field('facebook'); ?>">
                <?php the_field('facebook'); ?>
                </a><?php endif; ?></p>
              <p><span class="list">
                <?php if ( get_post_meta( get_the_ID(), 'twitter', true ) ) : ?>
    			<?php _e( 'Twitter: ' ); ?></span>
                <a href="<?php the_field('twitter'); ?>"><?php the_field('twitter'); ?>
                </a><?php endif; ?></p>
            </div>

    But i have a problem. So if you look here roma4you.servizieweb.it i have a lot of space between the field. How can i correct?

    Thank's

    http://wordpress.org/plugins/advanced-custom-fields/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.