Viewing 30 posts - 1 through 30 (of 30 total)
  • Author
    Posts
  • #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, 1 month ago by Sigmund.
    #843795

    Hey 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,
    Ismael

    #843818

    Hi 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 Regards

    #844293

    Hi,

    Did you modify the following code?

    // https://kriesi.at/support/topic/date-author-and-excerpt-in-magazine-element/#post-844292

    Best regards,
    Ismael

    #844322

    Yes.

    #844666

    Hi,

    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,
    Ismael

    #844695

    Hello,
    no, the posts are builded without the layout builder.
    Best Regards

    #845203

    Hi,

    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,
    Ismael

    #845224

    Hi,
    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.

    #845633

    Hi,

    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,
    Ismael

    #846517

    Hi,
    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'>&rarr;</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'>&rarr;</span></a></p></div>";
    

    Best Regards

    • This reply was modified 7 years, 1 month ago by Sigmund.
    #846765

    Hi,

    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'>&rarr;</span></a></div>";
    

    Best regards,
    Ismael

    #846806

    Great, 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 tried

    
    add_filter('excerpt_more','__return_false');
    

    but does not help.

    Best Regards

    • This reply was modified 7 years, 1 month ago by Sigmund.
    #847556

    Hi,

    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'>&rarr;</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,
    Ismael

    #847716

    Hello 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,

    #848917

    Hi,

    1.) Please remove the css code then look for this character code in the “excerpt” modification.

    &rarr;
    

    Remove it.

    Best regards,
    Ismael

    #848964

    Yes! Thanks a lot, Ismael.
    Best Regards

    #849471

    Hi,

    No problem. Please feel free to open a new thread if you need anything else.

    Best regards,
    Ismael

    #1146539

    hi 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 ?

    Screenshot

    the posts shown on this magazine filter are all made the same, with the avia builder and no manual excerpt.

    #1147002

    Hi,

    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,
    Ismael

    #1148090

    Thank 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…

    #1148412

    Hi,

    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,
    Ismael

    #1148422

    Ok 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…

    #1149106

    Hi,

    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,
    Ismael

    #1149179

    Hi 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.

    #1149190

    Hi,

    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,
    Ismael

    #1149197

    Ismael it’s a local website used as intranet, you can see the behaviour in this image:

    Screenshot

    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.

    #1149702

    Hi,

    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,
    Ismael

    #1149775

    yes i’m sure, no chars into the manual excerpt that’s why I thought it was strange..
    Anyway..thank you for your update.

    Marco

    #1149795

    Hi Marco,

    Glad we could help :)

    If you need further assistance please let us know.
    Best regards,
    Victoria

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