This topic has 12 replies, 3 voices, and was last updated 8 years by Radu.

  • Author
  • #113184
     mlacroix0
    Participant

    Hi,

    The post masonry for the blog articles shows the first sentences of the post under the featured image on the home blog page.

    How do I write a custom description for each article shown in the post masonry so that the description makes more sense and is not cut at a wrong place?

     

    Please let me know if the question is not clear and I’ll post pictures of what I ask.

    Thanks,

    Maxime

    #113290
     Radu
    Moderator

    Hi,

    Please follow this small video : https://drive.google.com/file/d/0Bxo5b6iHWRMwREVtYlpVV01OUnM/view

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #113366
     mlacroix0
    Participant

    Great! Thank you very much for this link.

    Is it possible to change the caracther length of the excert in this theme?

    Thanks,

    Maxime

    #113528
     Radu
    Moderator

    Hi,

    Add this code to your child theme ( wp-content/themes/kleo-child/functions.php )

    COPY CODE
    function custom_excerpt_length( $length ) {
    	return 20;
    }
    add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );
    

    Replace 20 with your desired number.

    Note : child theme needs to be active

    Cheers

    Radu

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #158764
     camelot
    Participant

    Hi, I tried to add your custom code in functions.php file but it doesn’t work. Please take a look at my site: http://maker-world.org/

    #158960
     Radu
    Moderator

    Hi,

    Use this solution : https://archived.seventhqueen.com/forums/topic/how-to-minimize-the-preview-of-blog-in-home-blogpost#post-158945

    Cheers

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #159126
     camelot
    Participant

    Hi Radu,

    Thanks for your reply. However I got this message:
    Warning: preg_replace(): Unknown modifier '\'

    That line is:
    $excerpt_initial = preg_replace( '<code>\[[^\]]*\]</code>', '', $excerpt_initial );

    I’m not familiar with Regex. Please help.

    #159386
     camelot
    Participant

    Hi, any update for the above error? Thanks.

    #159486
     Radu
    Moderator

    Hi,

    Sorry for the late reply, you run on php7 ?

    Can you please provide FTP credentials ? to take a closer look?

    On mine the excerpt it’s limited using that solution and also on other users install.

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #159504
     camelot
    Participant

    Hi, I’m running on PHP 5.6 and multi-site

    The FTP credential is:
    Host: maker-world.org
    Acc: maker@maker-world.org
    Pass: (dJos$W)rS@+

    #159643
     Radu
    Moderator

    Check it now

    Cheers
    R.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #159675
     camelot
    Participant

    Thanks Radu

    #159745
     Radu
    Moderator

    You’re welcome
    Cheers
    R

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 13 posts - 1 through 13 (of 13 total)

The forum ‘General questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?