[Support request] Add read more link to custom excerpts on Custom Post Type

Home Forums Support [Support request] Add read more link to custom excerpts on Custom Post Type

Home Forums Support Add read more link to custom excerpts on Custom Post Type

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1817288
    Alfonso

    Hi there, i need to add Read More link to custom Excerpts on Custom Post Type,

    im tried wit this code:

    add_filter( ‘wp_trim_excerpt’, ‘tu_excerpt_metabox_more’ );
    function tu_excerpt_metabox_more( $excerpt ) {
    $output = $excerpt;

    if ( has_excerpt() ) {
    $output = sprintf( ‘%1$s %3$s‘,
    $excerpt,
    get_permalink(),
    __( ‘Read more’, ‘generatepress’ )
    );
    }

    return $output;
    }

    But is not working

    #1818062
    Elvin
    Staff
    Customer Support

    Hi Alfonso,

    Your code is missing the HTML tags.

    Can you try the code provided here instead? https://docs.generatepress.com/article/activating-read-custom-excerpt/#read-more-button

    Let us know how it goes.

    A wise man once said:
    "Have you cleared your cache?"

    #1818187
    Alfonso

    Hi Elvin,

    I’ve been solved.

    So i have a new question, how i can change breakpoints?

    I need tablet mode change from 768px to 1200px, is not possible?

    #1818200
    Elvin
    Staff
    Customer Support

    I need tablet mode change from 768px to 1200px, is not possible?

    Is this for a specific element or for the whole page?

    If it’s for the whole page, it’s going to be tricky to do because some CSS are hardcoded on the stylesheets.

    You can try Tom’s filter here – https://generatepress.com/forums/topic/setting-custom-responsive-css-media-max-width-ranges/#post-1416756

    But this one doesn’t affect the ones that are already hardcoded.

    A wise man once said:
    "Have you cleared your cache?"

    #1818216
    Alfonso

    Hi Elvin,

    I’ve tried Tom’s filter and is not working 🙁

    You can check at:

    https://aelmhu2.111pixels.com/

    From 1025px to 1280px i have problems with header, font size etc…

    #1818219
    Elvin
    Staff
    Customer Support

    As mentioned previously, it won’t be fully effective because some CSS are hardcoded to the following breakpoints:

    @media(min-width:1025px) – bigger desktops
    @media(min-width:769px) and (max-width: 1024px) – tablet and smaller desktop
    @media(max-width:768px) – mobile viewport

    You can find these @media rules through all the .css files of the theme.

    To change these, I’m afraid you’ll have to manually override them w/ custom CSS.

    A wise man once said:
    "Have you cleared your cache?"

    #1818221
    Alfonso

    But is not possible to make mobile header until to 1200px for example?

    #1818430
    David
    Staff
    Customer Support

    Hi there,

    if its just the Mobile Header you want to change the breakpoint – go to Customizer > Layout > Primary Navigation and increase the Mobile Menu Breakpoint to 1200

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