Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #232826

    Hello,

    2 weeks ago i asked to have a blog-post with full content with read more
    https://kriesi.at/support/topic/full-content-with-read-more/

    is it possible to have it for the widget latest news (in right sidebar)
    > http://epsu-cj.eu/

    Thanks again for this great support !

    #234139

    Hi ceubri!

    Open up wp-content/themes/enfold/framework/php/class-framework-widgets.php and replace:

    
    				the_excerpt();
    				echo "</div>";
    

    with

    
    				get_the_content(__('Read more','avia_framework').'<span class="more-link-arrow">  &rarr;</span>');
    				echo "</div>";
    

    Regards,
    Peter

    #234605

    Sorry but that’s not working…
    I replace the code in 2 places.

    #234609

    Is it possible to manage this with the enfold-child ?
    for the posts in blog-posts i add this code in enfold-child :

    add_filter( 'post-format-standard', 'avia_category_content_filter', 15, 1);
    function avia_category_content_filter($current_post)
    {
    global $avia_config;
    global $more; 
    $more_bak = $more;
    
    if(!is_single() && empty($current_post['text_before']))
    {
    	$more = 0; 
    	$current_post['content'] =  get_the_content(__('Read more','avia_framework').'<span class="more-link-arrow">  &rarr;</span>');
    	$more = $more_bak;
    }
    return $current_post;
    }
    #235361

    Hi!

    Yes, you can try to overwrite the entire widget code with your child theme. Insert this code: http://pastebin.com/raw.php?i=QfxGGn3y into the child theme functions.php file (at the very bottom).

    Cheers!
    Peter

    #235407

    I did it,
    purge cache,
    test in 3 differents OS ( chrome, Firefox, IE)
    but nothing happend…
    Sorry

    #235635

    Hi!

    Please edit Dude’s code, look for this line:

    $more = 0; 
    				get_the_content(__('Read more','avia_framework').'<span class="more-link-arrow">  &rarr;</span>');
    $more = $more_bak;

    Replace it with:

    $more = 0; 
    				the_content();
    				echo "<a href='".get_permalink()."'>".__('Read more','avia_framework')."</a>";
    $more = $more_bak;

    Cheers!
    Ismael

    #235669

    great it works !

    Now i have 2 “read more” (“(suite…)” and “Lire la suite”)
    is it possible to anly have one ?
    (juste the same than in the posts “Lire la suite → “)
    Thanks !

    #235739

    Hey!

    How did you get the second read more link?

    Please add this on Quick CSS to remove the second link:

    .widget .more-link {
    display: none;
    }

    Replace the code above with this:

    $more = 0; 
    				the_content();
    				echo "<a class='widget-more-link' href='".get_permalink()."'>".__('Read more','avia_framework')."<span class='more-link-arrow'>  &rarr;</span></a>";
    $more = $more_bak;

    You can adjust the style of the link using the “.widget-more-link” selector.

    Cheers!
    Ismael

    #236221

    THANKS !!

    I don’t know How did you get the second read more link,
    maybe it’a automatic with a number of words ?

    Thx for your work, it’s very helpfull !

    One last question, i use WPML plugin,
    i have colors on links : blue color for FR and pink for EN language.
    But this “read more link” stay grey, how to fix that ?

    Bye

    • This reply was modified 10 years, 9 months ago by ceubri.
    #236758

    Hi!

    Try to insert this css code into the quick css field to change the color

    
    #top #wrap_all a.more-link{ color: #eb23eb; }
    

    You can change the color value if necessary. You can also set a different color for each language. Just use the language switcher on the theme option page and insert the code into the quick css field – each language will generate a separate dynamic stylesheet based on the quick css content.

    Cheers!
    Peter

    #236800

    You’re Great !!!

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘widget latest news with full content with read more’ is closed to new replies.