Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1323115
    mellyna
    Participant

    Hi !

    I’m working with ACF Pro. I managed to display the fields values in my post by adding the code below to my wp-single.php file in my X-Child theme.
    However, I have 2 problems :
    1/ I can’t figure out how to layout them according to my needs.
    2/ I didn’t find how to customize them by changing the font, the color, etc.

    Would you please be so kind to take a look at it and provide me some help.

    Thank you so much

    #1323213
    mellyna
    Participant
    This reply has been marked as private.
    #1323494
    Christopher
    Moderator

    Hi there,

    You should edit content.php file in the same directory, your code should be something like following :

    <?php
    
    // =============================================================================
    // VIEWS/INTEGRITY/CONTENT.PHP
    // -----------------------------------------------------------------------------
    // Standard post output for Integrity.
    // =============================================================================
    
    ?>
    
    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    <div class="x-column x-1-3 x-sm">  <div class="entry-featured">
        <?php x_featured_image(); ?>
      </div>
    <p><?php the_field('magasin_ou_net'); ?></p>
      </div>
    <div class="x-column x-1-3 x-sm">	<p><?php the_field('enseigne'); ?></p>
            <p><?php the_field('prix_normal'); ?></p>
    	<p><?php the_field('prix_promo'); ?></p>
    	<p><?php the_field('frais_de_port'); ?></p></div>
    <div class="x-column x-1-3 x-sm">
    
    	<p><?php the_field('date_de_debut'); ?></p>
    	<p><?php the_field('date_de_fin'); ?></p>
    	<p><?php the_field('code_promo'); ?></p>
    	<a href="<?php the_field('lien_du_bon_plan'); ?>" target="_blank">Voir le bon plan</a></div>
    
      <div class="entry-wrap">
        <?php x_get_view( 'integrity', '_content', 'post-header' ); ?>
        <?php x_get_view( 'global', '_content' ); ?>
      </div>
      <?php x_get_view( 'integrity', '_content', 'post-footer' ); ?>
    </article>

    Hope it helps.

  • <script> jQuery(function($){ $("#no-reply-1323115 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>