-
AuthorPosts
-
April 10, 2019 at 9:43 am #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!April 11, 2019 at 8:33 am #1089453Hey sacha,
I don’t understand you question, could you try to clarify please?
Best regards,
RikardApril 18, 2019 at 7:16 pm #1092489Hello!
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
SachaApril 21, 2019 at 9:20 am #1093012Excuse 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 enfoldBest regards,
Sacha- This reply was modified 5 years, 7 months ago by Marco.
April 21, 2019 at 8:05 pm #1093120Hi,
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,
BasilisApril 23, 2019 at 5:08 pm #1093704Hi 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, 7 months ago by Marco.
April 24, 2019 at 9:27 pm #1094181Hi,
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,
BasilisApril 24, 2019 at 9:33 pm #1094183Hello!
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, 6 months ago by Marco.
April 30, 2019 at 12:18 am #1095522Hi,
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,
IsmaelApril 30, 2019 at 6:32 pm #1095832Hello,
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: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 .. thanksBest regards,
SachaMay 3, 2019 at 1:38 am #1096668Hi,
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,
IsmaelMay 3, 2019 at 7:58 am #1096771Hello!
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, 6 months ago by Marco.
May 4, 2019 at 12:13 pm #1097161Hello !
Does anyone have news to help me?
I may have discovered the cause of ACF’s failure to workI 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?May 4, 2019 at 3:46 pm #1097238May 10, 2019 at 4:19 pm #1099310Hi,
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,
YigitMay 10, 2019 at 4:29 pm #1099316ok thanks, I try now and tell you..
- This reply was modified 5 years, 6 months ago by Marco.
May 10, 2019 at 4:56 pm #1099330Maybe 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
SachaMay 10, 2019 at 5:36 pm #1099344Hi,
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,
YigitMay 10, 2019 at 6:46 pm #1099392Unfortunately 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 652so 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>”;
}May 21, 2019 at 10:51 am #1102789Hi,
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,
IsmaelMay 21, 2019 at 11:24 am #1102802Hello!
I’m happy to read youYes, 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, 6 months ago by Marco.
May 27, 2019 at 3:29 am #1104389Hi,
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,
IsmaelMay 28, 2019 at 7:10 pm #1104936Hi 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,
SachaMay 31, 2019 at 4:34 am #1105571Hi,
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,
IsmaelMay 31, 2019 at 5:01 pm #1105754Hello 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
sachaJune 3, 2019 at 3:51 am #1106543 -
AuthorPosts
- The topic ‘How to add a custom field to a portfolio with ACF? "’ is closed to new replies.