Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • #343987


    I am using several custom fields for some of my posts and I want to display them after content. I am also using mappress and YARPP to display more content into the entries. Also I would like to include some HR into the content.

    Here is the code used to display custom fields:

    `// echo the post content
    echo ‘<div class=”entry-content” ‘.avia_markup_helper(array(‘context’ => ‘entry_content’,’echo’=>false)).’>’;
    echo $content;
    echo ‘</div>’;

    /* Let’s show our custom fields here */

    $destino_web = get_post_meta( get_the_ID(), ‘web’, true);
    $destino_telefono = get_post_meta( get_the_ID(), ‘telefono’, true);
    $destino_precio = get_post_meta( get_the_ID(), ‘precio’, true);
    $destino_horario = get_post_meta( get_the_ID(), ‘horario’, true);

    if( ! empty( $destino_web ) ) { echo ‘<p><strong>Web:</strong><a href=”‘ . $web . ‘”><?php get_the_title(); ?></a></p>’; }
    if( ! empty( $destino_telefono ) ) { echo ‘<p><strong>Telefono:</strong> ‘ . $destino_telefono . ‘</p>’; }
    if( ! empty( $destino_precio ) ) { echo ‘<p><strong>Precio:</strong> ‘ . $destino_precio . ‘</p>’; }
    if( ! empty( $destino_horario ) ) { echo ‘<p><strong>Horario:</strong> ‘ . $destino_horario . ‘</p>’; }

    /* End showing our custom fields here */`

    In the private content I also share the website URL and a Picture to give a better explanation.


    Hi Kevin!

    You can render Enfold HR element using do_shortcode, try with this:

    echo do_shortcode("[av_hr class='full' height='50' shadow='no-shadow' position='center' custom_border='av-border-thin' custom_width='50px' custom_border_color='' custom_margin_top='30px' custom_margin_bottom='30px' icon_select='yes' custom_icon_color='' icon='ue808' font='entypo-fontello' custom_class='']");



    Hello Josue,

    It doesn’t work. I added the code just after this:

    echo $content;
    echo ‘</div>’;



    Try adding this code to the Quick CSS:

    .mapp-layout {
       border: 0 !important;
    .mapp-layout:before, .yarpp-related:before, .yarpp-related:after{
        content: "";
        height: 1px;
        background: #e1e1e1;
        display: block;
        width: 110%;
        margin-bottom: 30px;
        margin-top: 30px;



    Hello Josue,

    Thanks, but I’m more concerned to change the order of the elements. Trying to do so, I used different combinations like adding directly the mappress and yarpp to the loop-index, but it doesn’t works and is related with the do_shortcode and template syntax:

    /* Show Related Posts, the real one is <?php related_posts(); ?>, but it breaks the layout */
    /* Show Map */
    echo do_shortcode('[mashup query="current"]');

    Do you know why the theme doesn’t allow the do_shortcode or others?



    I don’t think the problem is in the theme to be honest, try doing the same with the default WordPress theme (Twenty Fourteen) to discard.



    Hello Josue,

    You are right, now it is solved, thanks for help.



Viewing 7 posts - 1 through 7 (of 7 total)

The topic ‘Modify loop-index.php plugin order display and custom fields’ is closed to new replies.