-
AuthorPosts
-
August 21, 2017 at 9:34 pm #842242
Hello at Kriesi,
I have customized the magazine layout element to have a bigger thumbnail. Looks great ;-)Now I like to have two things achieved:
First the blog excerpt in all of the magazine entries. I have tried the code from
https://kriesi.at/support/topic/magazine-customize/ but this and some other codes from the forum did not helped.Second I like the margin/padding all the same. I have tried
#top .av-magazine-thumbnail, #top .av-magazine-thumbnail a, #top .av-magazine-thumbnail a img { width: 230px; min-height: 120px; }
but this does not make it correct.
Can you help?
Best Regards
- This topic was modified 7 years, 2 months ago by Sigmund.
August 25, 2017 at 9:02 am #843795Hey Sigmund,
Thank you for using Enfold.
1.)Please visit the following thread.
// https://kriesi.at/support/topic/date-author-and-excerpt-in-magazine-element/#post-842342
2.) Adjust the minimum height of the magazine entries.
.av-magazine-content-wrap { min-height: 160px !important; }
Adjust the value as needed
Best regards,
IsmaelAugust 25, 2017 at 9:47 am #843818Hi Ismael,
thats what I was trying before. I tried it ones again now and the excerpt is not showing.
Can you have a closer look?
Best RegardsAugust 26, 2017 at 6:14 am #844293Hi,
Did you modify the following code?
// https://kriesi.at/support/topic/date-author-and-excerpt-in-magazine-element/#post-844292
Best regards,
IsmaelAugust 26, 2017 at 11:13 am #844322Yes.
August 28, 2017 at 6:04 am #844666Hi,
Did you use the advance layout builder for the posts? If you did, you have to specify the excerpts manually. Please post the FTP details in the private field. We would like to check it.
Best regards,
IsmaelAugust 28, 2017 at 7:24 am #844695Hello,
no, the posts are builded without the layout builder.
Best RegardsAugust 29, 2017 at 6:29 am #845203Hi,
I can’t connect to the server. It’s timing out. We did the suggestion in the previous thread and it is working. Please try it again.
// https://kriesi.at/support/topic/date-author-and-excerpt-in-magazine-element
Best regards,
IsmaelAugust 29, 2017 at 8:05 am #845224Hi,
the server is ok for me. Do you have http or FTP problems?
I have added all code from linked topic but it did not help. I have added manually excerpt also.August 30, 2017 at 6:52 am #845633Hi,
Please look for this code.
$image = “”; $extraClass = “av-magazine-no-thumb”; $excerpt = !empty($entry->post_excerpt) ? $entry->post_excerpt : avia_backend_truncate($entry->post_content, apply_filters( ‘avf_magazine_excerpt_length’ , 60) , apply_filters( ‘avf_magazine_excerpt_delimiter’ , ” “), “…”, true, ”);
The $excerpt should be outside the curly braces.
if($style == 'small') { if(empty($this->atts['thumbnails'])) { $image = ""; $extraClass = "av-magazine-no-thumb"; } $excerpt = !empty($entry->post_excerpt) ? $entry->post_excerpt : avia_backend_truncate($entry->post_content, apply_filters( 'avf_magazine_excerpt_length' , 60) , apply_filters( 'avf_magazine_excerpt_delimiter' , " "), "…", true, ''); } else { $excerpt = !empty($entry->post_excerpt) ? $entry->post_excerpt : avia_backend_truncate($entry->post_content, apply_filters( 'avf_magazine_excerpt_length' , 60) , apply_filters( 'avf_magazine_excerpt_delimiter' , " "), "…", true, ''); }
Best regards,
IsmaelAugust 31, 2017 at 9:33 pm #846517Hi,
great, now it works! Thanks a lot, Ismael.
Is there a way to show the Read more link also? I have tried the code from Ricard from https://kriesi.at/support/topic/show-the-read-more-link-in-a-new-line-in-the-magazine-element/if($excerpt)$output .= "<div class='av-magazine-content entry-content' {$markupContent}>{$excerpt}<p><a href='".get_permalink($entry->ID)."' class='more-link'>".__('Read more','avia_framework')."<span class='more-link-arrow'>→</span></a></p></div>";
in the functions.php but this does not work.
My whole code for the magazine element in the functions.php is
/* Magazine Layout Startseite */ add_filter('avf_magazine_settings', 'avia_magazine_thumbnail', 10, 2); function avia_magazine_thumbnail($atts, $magazine){ $atts['image_size']['small'] = 'masonry'; return $atts; } 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.'/shortcodes/'); return $paths; } add_filter('avf_magazine_excerpt_length','avf_magazine_excerpt_new_lenght', 10, 1); function avf_magazine_excerpt_new_lenght($excerpt) { $excerpt = 200; return $excerpt; } /* Zeigt Read more unter magazine eintrag */ if($excerpt)$output .= "<div class='av-magazine-content entry-content' {$markupContent}>{$excerpt}<p><a href='".get_permalink($entry->ID)."' class='more-link'>".__('Read more','avia_framework')."<span class='more-link-arrow'>→</span></a></p></div>";
Best Regards
- This reply was modified 7 years, 2 months ago by Sigmund.
September 1, 2017 at 10:12 am #846765Hi,
Please remove that code from the functions.php file. Edit the magazine.php file agian, look for this code:
$output .= "<div class='av-magazine-content entry-content' {$markupContent}>{$excerpt}</div>";
Replace it with the code.
$output .= "<div class='av-magazine-content entry-content' {$markupContent}>{$excerpt}<a href='".get_permalink($entry->ID)."' class='more-link'>".__('Read more','avia_framework')."<span class='more-link-arrow'>→</span></a></div>";
Best regards,
IsmaelSeptember 1, 2017 at 11:21 am #846806Great, now it is there. But can you have a look again? That would be great.
1. Now I have to arrows, from which the first one I dont want to have. It is not implemented by CSS, so I cannot delete it. When I do.more-link-arrow {display:none;}
both arrows are getting deleted.
2. How do I get the Read more (“Artikel lesen” in the next line)?
3. How do I delete the 3 dots behind the excerpt? I have triedadd_filter('excerpt_more','__return_false');
but does not help.
Best Regards
- This reply was modified 7 years, 2 months ago by Sigmund.
September 4, 2017 at 8:25 am #847556Hi,
1.) Remove the second arrow with this.
.av-magazine-content .more-link-arrow:after { display: none; }
2.) Wrap the excerpt with the paragraph tag.
$output .= "<div class='av-magazine-content entry-content' {$markupContent}><p>{$excerpt}</p><a href='".get_permalink($entry->ID)."' class='more-link'>".__('Read more','avia_framework')."<span class='more-link-arrow'>→</span></a></div>";
3.) Look for the previous modification.
$excerpt = !empty($entry->post_excerpt) ? $entry->post_excerpt : avia_backend_truncate($entry->post_content, apply_filters( 'avf_magazine_excerpt_length' , 60) , apply_filters( 'avf_magazine_excerpt_delimiter' , " "), "…", true, '');
Replace it with:
$excerpt = !empty($entry->post_excerpt) ? $entry->post_excerpt : avia_backend_truncate($entry->post_content, apply_filters( 'avf_magazine_excerpt_length' , 60) , apply_filters( 'avf_magazine_excerpt_delimiter' , " "), "", true, '');
Best regards,
IsmaelSeptember 4, 2017 at 1:51 pm #847716Hello Ismael,
great, 2. and 3. are wonderful now. At 1. you get me wrong. As I wrote above I want to delete the first (long) arrow. Your code deletes the second arrow. I have send you a screenshot in the private content area.Best Regards,
September 7, 2017 at 3:26 am #848917Hi,
1.) Please remove the css code then look for this character code in the “excerpt” modification.
→
Remove it.
Best regards,
IsmaelSeptember 7, 2017 at 9:07 am #848964Yes! Thanks a lot, Ismael.
Best RegardsSeptember 8, 2017 at 8:30 am #849471Hi,
No problem. Please feel free to open a new thread if you need anything else.
Best regards,
IsmaelOctober 9, 2019 at 3:45 pm #1146539hi guys, I removed the “else” to always show the excerpt in the magazine section, if there is any “manually” entered.
this works, and is ok.I don’t know why, sometimes happen that I show three dots (…) when there is no excerpt entered (cause I don’t want to show anything).
Can’t understand these three dots where they come from, should they come from here?$excerpt = !empty($entry->post_excerpt) ? $entry->post_excerpt : avia_backend_truncate($entry->post_content, apply_filters( 'avf_magazine_excerpt_length' , 60) , apply_filters( 'avf_magazine_excerpt_delimiter' , " "), "…", true, '');
these three dots I see at the end of the line?
If yes, why in the majority of the posts, when I don’t manually add an excerpt, I don’t show anything and in some posts (can’t tell the differences) I can see these three dots ?the posts shown on this magazine filter are all made the same, with the avia builder and no manual excerpt.
October 11, 2019 at 4:56 am #1147002Hi,
Thank you for the inquiry.
You can remove the dots directly from the “avia_backend_truncate” function or use the “avf_magazine_excerpt_delimiter” to replace it with something else, a blank space for example. If in case the filter didn’t work, try to use the excerpt_more filter.
// https://codex.wordpress.org/Plugin_API/Filter_Reference/excerpt_more
Best regards,
IsmaelOctober 15, 2019 at 2:15 pm #1148090Thank you Ismael,
I found this code into functions-enfold.php
if(!empty($post->post_excerpt)) { $excerpt = apply_filters( 'avf_ajax_search_excerpt', avia_backend_truncate($post->post_excerpt,70," ","", true, '', true) ); }
but removing the dots doesn’t seem to solve the problem.
Also, the main question remain, why that post is showing the dots and the other one are not? All posts are made the same with the builder and no manual excerpt…October 16, 2019 at 11:37 am #1148412Hi,
Thank you for the update.
We are actually referring to the “avia_backend_truncate” in the magazine.php file. It’s included in the line of code you posted above. The dots can be removed or replaced directly from that function.
Best regards,
IsmaelOctober 16, 2019 at 11:54 am #1148422Ok ok perfect, that is working now.
Just for my curiosity, why this was happening only for some posts and not for all the others? when technically the posts were all made the same way…
October 18, 2019 at 5:52 am #1149106Hi,
Thank you for the update.
Did you modify the magazine.php file before? Try to look for the another $excerpt variable in the magazine.php file and once again, try to remove the dots in the “avia_backend_truncate” function. Maybe that is where the dots are coming from.
Best regards,
IsmaelOctober 18, 2019 at 9:17 am #1149179Hi Ismael,
maybe I’ve been misunderstood, I successfully removed the three dots here:
$excerpt = !empty($entry->post_excerpt) ? $entry->post_excerpt : avia_backend_truncate($entry->post_content, apply_filters( 'avf_magazine_excerpt_length' , 60) , apply_filters( 'avf_magazine_excerpt_delimiter' , " "), "…", true, '');
I was just wondering why they were not appearing in all the excepts but in some random posts.
October 18, 2019 at 10:07 am #1149190Hi,
Thank you for the update.
Where can we see the issue? If possible, please create a new thread or ticket and provide all necessary details in the private field. We’ll close this thread for now.
Best regards,
IsmaelOctober 18, 2019 at 10:26 am #1149197Ismael it’s a local website used as intranet, you can see the behaviour in this image:
you have to think that all this posts are made all the same way, with avia builder and no excerpt. but in some cases i can see the three dots (now removed with the edits, so i’m ok)
I was just wondering why in some posts that happened and in some not. just a curiosity.October 21, 2019 at 4:55 am #1149702Hi,
We are not really sure how those dots got there. Are you sure that you didn’t define the excerpt of that post manually? It will only be added when a post contains an excerpt.
Thank you for the update.
Best regards,
IsmaelOctober 21, 2019 at 10:18 am #1149775yes i’m sure, no chars into the manual excerpt that’s why I thought it was strange..
Anyway..thank you for your update.Marco
October 21, 2019 at 10:57 am #1149795Hi Marco,
Glad we could help :)
If you need further assistance please let us know.
Best regards,
Victoria -
AuthorPosts
- You must be logged in to reply to this topic.