Viewing 26 posts - 1 through 26 (of 26 total)
  • Author
    Posts
  • #1089039

    Hi,
    I wish to show the same article in moore page, and I would like to show a different summary in each pages , or add a field with different word..
    Thanks!

    #1089453

    Hey sacha,

    I don’t understand you question, could you try to clarify please?

    Best regards,
    Rikard

    #1092489

    Hello!
    I could solve the problem by myself but I can’t make the shortcodes executable in the excpert of portfolio articles,
    ,
    and no one seems to know how to give me an answer.
    Please, help me !
    Thanks
    Sincerly
    Sacha

    #1093012

    Excuse me, I’ll try to explain better.
    I need to add dynamic custom fields above or below the preview photos of the articles, shown with blog grids. I think this can be done with the custom fields plugin, but it doesn’t work on enfold

    Best regards,
    Sacha

    • This reply was modified 5 years, 8 months ago by Marco.
    #1093120

    Hi,

    Unfortunately, it would require quite some time and customization of the theme to achieve this, so I am sorry to tell you that this is not covered by our support. However, if it’s really important for you to get this done, you can always hire a freelancer to do the job for you :)

    Best regards,
    Basilis

    #1093704

    Hi everyone
    I tried to listen to a freelancher but … I just can’t afford it.
    I have to figure out for myself how it works and how to do it … maybe you can give me some indication to do it myself?

    I also have another problem, but I can’t open a new topic …
    The “scroll on top” button no longer works, and I do not understand what is the cause, I have already tried to disable all the plugins, I believe it has stopped working with the last enfold update.
    Can you do a check?

    • This reply was modified 5 years, 8 months ago by Marco.
    #1094181

    Hi,
    Unfortunately what you need to do is advanced modification and it is not covered from our support policy.

    To try explain you, you need to make a Child Theme, copy the template files that are responsible for this and edit them to show the info you require.

    Best regards,
    Basilis

    #1094183

    Hello!

    perfect, I already have the child theme, but I don’t know what the file to edit is, and how to modify it, if I had the code and knew in which file to write it, I can recreate the path in the child theme and try

    -I also have another problem, because after the last update of enfold, the scrolls no longer work, for example the scroll on top button that remains fixed, doesn’t work. I put the link in private for you to try ..

    Sincerly
    Sacha

    • This reply was modified 5 years, 8 months ago by Marco.
    #1095522

    Hi,

    Thanks for the update.

    We can’t check the site directly due to personal reasons but we’ll try to help as much as we can.Are you using the blog grid element? If so, please try to edit the config-templatebuilder > aviashortcodes > postslider > postslider.php file. Look for the html function and the post loop around line 484. Inside that loop, you should be able to add the ACF fields. If you want to add it before the read more link for example, edit line 511:

    $permalink = '
    <div class="read-more-link"><a href="'.get_permalink($the_id).'" class="more-link">'.__('Read more','avia_framework').'<span class="more-link-arrow"></span></a></div>
    ';
    
    

    The code might look something like this:

    $acf_field = get_field('field_name');
    $permalink = $acf_field . '
    <div class="read-more-link"><a href="'.get_permalink($the_id).'" class="more-link">'.__('Read more','avia_framework').'<span class="more-link-arrow"></span></a></div>
    ';
    

    Best regards,
    Ismael

    #1095832

    Hello,
    I tried but it doesn’t work ..
    I searched a bit on the web and it seems that the problem is just enfold compatibility with a.c.f.
    But I saw that someone managed to make it work in the past:

    https://kriesi.at/support/topic/how-to-get-the-id-of-the-post-when-you-use-the-avf_post_slider_entry_excerpt/#post-640822

    this is the code in my postslider.php file now:
    $acf_field = get_field(‘provacategorie’);
    $permalink = $acf_field . ‘
    <div class=”read-more-link”>‘.__(‘Read more’,’avia_framework’).'<span class=”more-link-arrow”></span></div>
    ‘;
    but looking at the solutions of the predenti links … what am I missing? what should i add?

    ps: can’t you log in for personal reasons?
    I hope there are no problems in particular with this site or with me … I hope in your sincerity … maybe you are my competitor? if there are any “personal” problems please be clear so that I can search for other topics with other staff .. thanks

    Best regards,
    Sacha

    #1096668

    Hi,

    Thanks for the update.

    Did you enable the excerpt for your posts? Try to place the custom field somewhere else in the file. If you want to add it below the title, look for this line.

    $output .=  "
    <h3 class='slide-entry-title entry-title' $markup><a href='{$link}' title='".esc_attr(strip_tags($title))."'>".$title."</a></h3>
    ";
    

    The site contains nudity or explicit content and I prefer not to open it. I will ask the team to check the thread.

    Best regards,
    Ismael

    #1096771

    Hello!
    yes in some galleries the expert is enabled, in others not, but nothing changes in any of the galleries.

    I understand that you can’t come in … okay, if you can pass the word to someone who can more closely monitor you would do me a favor.
    it seems that no child enfold does not read any changes in that file.
    In fact a developer who solved a problem for me, had to modify the postslider.php file of the main theme because the changes in the postslider.php file of the child theme had no effect … but in the wordpress dashbord I have enfold child and I edit with that my items.
    What could be the cause?
    Best regards,
    Sacha

    • This reply was modified 5 years, 7 months ago by Marco.
    #1097161

    Hello !
    Does anyone have news to help me?
    I may have discovered the cause of ACF’s failure to work

    I noticed that although I use enfold Child, my site is reading some files of the main theme “enfold” and not of enfold Child.
    How is this possible? who can look at my site?

    #1097238
    #1099310

    Hi,

    Have you referred to this post – https://kriesi.at/documentation/enfold/intro-to-layout-builder/#add-elements-to-alb? After adding the code to functions.php file of your child theme and adding the file inside /shortcodes/ folder on your child theme should work.

    Best regards,
    Yigit

    #1099316

    ok thanks, I try now and tell you..

    • This reply was modified 5 years, 7 months ago by Marco.
    #1099330

    Maybe I was wrong … the folder I added in the child theme is –enfold-child / config-templatebuilder / avia-shortcode

    But I saw now that the instructions say to create only the enfold-child / shortcode folder

    Which is the right option?

    Sincerly
    Sacha

    #1099344

    Hi,

    Please create a enfold-child/shortcode folder and place your file you copied from enfold/config-templatebuilder/avia-shortcode there or change the code to following one

    add_filter('avia_load_shortcodes', 'avia_include_shortcode_template', 15, 1);
    function avia_include_shortcode_template($paths)
    {
      $template_url = get_stylesheet_directory();
          array_unshift($paths, $template_url.'/config-templatebuilder/avia-shortcode/');
    
      return $paths;
    }

    Best regards,
    Yigit

    #1099392

    Unfortunately nothing good yet, I tried:
    first attempt, I had put the url ‘/ config-templatebuilder / avia-shortcode / in the code, I also did a cache purge, but there was no effect.
    So I tried moving the folder to enfold-child / shortcode, and renaming the file from “avia-shortcode” to just “shortcode”
    the site has crashed reporting a syntax error to the enfold-child / shortcode / portfolio / portfolio.php on line 652

    so I renamed the folder to “avia-shortcode”, the site is working again, but the shortcode problem is not solved.
    it seems that when the system reads the right file in the child theme, it goes into error, so probably there is an error as reported on line 652..del file portfolio.php
    I’ll paste the codes around that line here so you can see where the problem is, but if you could log in and check for yourself maybe we’ll speed up.

    ( Line 652 enfold-child/config-templatebuilder/avia-shortcodes/portfolio/portfolio.php )

    $output .= !empty($excerpt) ? “<div class=’grid-entry-excerpt entry-content’ “.avia_markup_helper(array(‘context’=>’entry_content’,’echo’=>false, ‘id’=>$the_id, ‘custom_markup’=>$custom_markup)).”>”.do_shortcode($excerpt).”</div>” : ”;
    $output .= !empty($title) || !empty($excerpt) ? “</div>” : ”;
    $output .= ‘<footer class=”entry-footer”></footer>’;
    $output .= “</article>”;
    $output .= “</div>”;
    }

    #1102789

    Hi,

    Thanks for the update.

    Are you using the posts or the portfolio?
    What is the name of the ACF field that you want to add?
    Where exactly do you want to place it?

    We should be able to replicate it in on our own installation without visiting your site. We can then post the solution here afterward.

    Best regards,
    Ismael

    #1102802

    Hello!
    I’m happy to read you

    Yes, I using oportfolio articles, theese are shown into a lot of pages, using blog grid setted with tag in order to show portfolio articles…

    The ACF field name is ” provacategorie ” (without marks “)

    I wish to show a field or if possible 2 fields, one under the preview images into the blog grid, and one at the fine of the excpert, of each preview.
    .
    in the field i wish to put a shortcode or a widget …

    although acf does not work in any of its functions on my site, the function that I would like to insert I think requires special care, I put in private the link … it explains something that perhaps can be of help.
    Let me know if you can identify and solve the problem..
    Many thanks

    • This reply was modified 5 years, 7 months ago by Marco.
    #1104389

    Hi,

    Thanks for the update.

    Looks for this code around line 709:

    $output .= !empty($excerpt) ? "<div class='slide-entry-excerpt entry-content' $markup>".$excerpt."</div>" : "";
    

    Replace it with:

    $acf_provacat = get_field('provacategorie');
    $output .= "<div class='slide-entry-excerpt entry-content' $markup>".$excerpt.$acf_provacat."</div>";
    

    That should render the value of the provacategorie inside the excerpt container. If you want to place another custom field below the feature image, look for this line:

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

    Just assign the custom field in a variable and render it inside the container as shown above.

    Best regards,
    Ismael

    #1104936

    Hi Ismael!
    Thank you so much for your help
    But unfortunately it still doesn’t work.
    I have 2 oddities,
    – 1) working on the file postslider.php in enfold-child I don’t see any effect
    -2) modifying the Postslider.php inside enfold parent yes, in fact on the first attempt there was probably some error in making copy-paste, and the site stopped. I tried again pasting line by line and there is no more error, but a.c.f. it does not work yet.
    Now my postslider.php file around those lines is like this:

    class=’slide-meta-del’>/</div>”;
    }
    $markup = avia_markup_helper(array(‘context’ => ‘entry_time’,’echo’=>false, ‘id’=>$the_id, ‘custom_markup’=>$custom_markup));
    $meta .= “<time class=’slide-meta-time updated’ $markup>” .get_the_time(get_option(‘date_format’), $the_id).”</time>”;
    $meta .= “</div>”;

    if( strpos($blogstyle, ‘elegant-blog’) === false )
    {
    $output .= $meta;
    $meta = “”;
    }
    }
    $markup = avia_markup_helper(array(‘context’ => ‘entry_content’,’echo’=>false, ‘id’=>$the_id, ‘custom_markup’=>$custom_markup));
    $excerpt = apply_filters( ‘avf_post_slider_entry_excerpt’, $excerpt, $prepare_excerpt, $permalink, $entry );
    $acf_provacat = get_field(‘provacategorie’);
    $output .= “<div class=’slide-entry-excerpt entry-content’ $markup>”.$excerpt.$acf_provacat.”</div>”;

    $output .= “</div>”;
    $output .= ‘<footer class=”entry-footer”>’;
    if( !empty($meta) ) $output .= $meta;
    $output .= ‘</footer>’;

    Sincerly,
    Sacha

    #1105571

    Hi,

    Are you sure that you’re using the post slider or the blog posts element set as grid layout? Try to replace this line:

    $acf_provacat = get_field('provacategorie');
    

    .. with:

    $acf_provacat = get_field('provacategorie', $the_id);
    

    Best regards,
    Ismael

    #1105754

    Hello Ismael!

    I’m sorry .. I’m really discouraged. It doesn’t even work that way …
    nobody of your staff can access on my dashboard site?
    Please , help me…
    Sincerly
    sacha

    #1106543

    Hi,

    Sorry about that. I’ve forwarded the thread to Yigit.

    Which element are you using? Is it a Blog Posts element set to grid layout or a Portfolio Grid? The modification above is for the Blog Posts element.

    Best regards,
    Ismael

Viewing 26 posts - 1 through 26 (of 26 total)
  • The topic ‘How to add a custom field to a portfolio with ACF? "’ is closed to new replies.