Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #1262163

    Hi. I have added, with Advanced custom fields, 2 fields in the posts. Also, I would like to put the categories.

    I have used this widget

    And this is the result

    I would like it to stay like this

    I go to wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/postslider.php and above this line >> $output .= $thumbnail ? “{$thumbnail}” : “”; I put this
    $taxonomies = get_object_taxonomies(get_post_type($the_id));
    $output .= “<div class=’categ’>”.$taxonomies.”</div>”;

    But the result that you return to me is

    What have I put wrong?

    In the case of the country and the image of the flag, above this line >> $output .= “<h3 class=’slide-entry-title entry-title’ $markup>“.$title.”</h3>”; I have put

    $pais = get_field (“País”, $entry->ID);
    $output .= “<div class=’pais’>”.$pais.”</div>”;
    $bandera = get_field (“bandera”, $entry->ID);
    $image = get_field(‘Bandera’);
    $size = ‘full’; // (thumbnail, medium, large, full or custom size)
    if( $image ) {
    echo wp_get_attachment_image( $image, $size );};
    $output .= “<div class=’bandera’>”.$Bandera.”</div>”;

    And this is the result

    The ARRAY is of the country and the image is not visible. How should I put it on to make it look good? The country data are from a multi-selection field and the flag data from an image field

    Can you help me find the solution?

    • This topic was modified 4 years ago by jeiceta.
    #1262255

    Hey jeiceta,

    Please post us your login credentials (in the “private data” field), so we can take a look at your backend.

    1. Install and activate ” Temporary Login Without Password “.
    2. Go to ” Users > Temporary Logins ” on the left-side menu.
    3. Click ” Create New “.
    4. Add the email address for the account ( you can use (Email address hidden if logged out) ), as well as the ” Role ” making that the highest possible and the expiry about four days
      ( to be sure that we have enough time to debug ).
    5. Click ” Submit “.
    6. You’ll now have a temporary account. Please provide us here in the private section the URL, so we can login and help you out.

    When your issue is fixed, you can always remove the plugin!
    If you prefer to not use the plugin, you can manually create an admin user and post the login credentials in the “private data” field.

    Best regards,
    Nikko

    #1262415
    This reply has been marked as private.
    #1262416

    Done. The post is in Hitos de Tenerife

    • This reply was modified 4 years ago by jeiceta.
    #1262626

    Hi jeiceta,

    I have checked on your site and it seems you have already done it.
    The only thing I think that remains is to apply it to the child theme so your tweaks/modification won’t be lost during the theme update.
    Just follow the instructions in the documentation: https://kriesi.at/documentation/enfold/intro-to-layout-builder/#add-elements-to-alb

    Best regards,
    Nikko

    #1262714

    Hi. Thank you for reviewing it. I have added the fields that I comment on the backend, but not on the frontend. That is where I have the problem. My question is, in which file, I think it is wp-content / themes / enfold / config-templatebuilder / avia-shortcodes / postslider.php, do I have to add those fields, which I explain at the beginning of this post, and how?

    #1263519

    Hi jeiceta,

    I apologize I wasn’t able to respond before the link expired.
    I was able to see those fields reflect in the frontend and the location is correct (line 764 in postslider.php):

    $output .= $thumbnail ? "<a href='{$link}' data-rel='slide-" . avia_post_slider::$slide . "' class='slide-image' title='{$image_link_title}'>{$thumbnail}</a>" : '';

    If it’s on top of the image then place it before the code and concatenate it in the $output variable and if its below then put it after.

    Best regards,
    Nikko

    #1263552

    Hi Nikko. Right. I know that. I put it in the first entry of this post. What I would like to know is what am I doing wrong. I have put the code that you can see in the image

    And the result is what you see in the following image. The Año field reflects this well. But the flags (bandera) are put where you can see, instead of under the image of the post. And put those of all the entries on the page. I do not know why. And the country (pais), instead of putting the name, in this case United Kingdom, puts ARRAY. How do I make it look the way I want?

    • This reply was modified 4 years ago by jeiceta.
    #1263902

    Hi jeiceta,

    I think the reason why it’s returning an array is because the Return Format of the image field is Image Array (which is set by default) and the code you used is for Image ID as written in the ACF documentation: https://www.advancedcustomfields.com/resources/image/

    Best regards,
    Nikko

    #1264747

    Hi Nikko,

    Sorry for not answering earlier. I have not been able to do tests. As soon as I do, I’ll tell you. Thanks for your interest

    #1264800

    Hi jeiceta,

    No worries, just let us know if you need assistance.

    Best regards,
    Nikko

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.