• Resolved Boris

    (@ispacecrusader)


    Hi,
    I’ve recently discovered the Getwid plugin, and I’m very happy with it!

    However, I’m experiencing one issue:
    I’m building a website containing a page with the Custom Post Type block, which I set up to use a custom template (within Getwid) that includes the excerpt.

    I want to remove the three dots at the end of the excerpt, but I cannot get them to disappear. I’ve tried various code snippets that should do the trick, but they are not working. I’ve tested with both the Astra and 2022 themes.

    On a standard posts archive, the three dots have indeeed disappeared, just not on the Getwid CPT block.

    Can you help me get this sorted?

    Thanks!

    The page I need help with: [log in to see the link]

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter Boris

    (@ispacecrusader)

    Hi,
    have you had a chance to look at my question?

    Thank you!
    Kind regards

    Thread Starter Boris

    (@ispacecrusader)

    I’ve had a good look at the code. As far as I can see, the Custom Post Type is using the includes/templates/custom-post-type/post.php file to generate the posts. Is that correct?

    It makes use of the normal the_excerpt function.

    But the normal customization option as described here (at 11) does not work. Do you have any idea why?

    Plugin Support eugenewhite

    (@eugenewhite)

    Hi Boris,
    Thanks for contacting us and accept our apologies for the delay. The excerpt block shows the information added to the Excerpt Field of each post. When there is no Excerpt that has been added to the post, it shows the short description with 3 dots at the end. You may remove them by adding the code to the functions.php file of the theme:

    add_filter( 'default_page_template_title', 'villagio_default_page_template_title' );
    
    function new_excerpt_more( $more ) {
        return '' ;
    }
    add_filter('excerpt_more', 'new_excerpt_more');

    Let us know if it is helpful.

    Thread Starter Boris

    (@ispacecrusader)

    Hi @eugenewhite ,
    thank you for your help!

    I added the snippet to functions.php, but there is no change. Should I change something in the snippet to names within my own setup?

    Plugin Support eugenewhite

    (@eugenewhite)

    Hello Boris.

    Sorry, my bad. There shouldn’t be a filter. Here’s the code that you may need to use instead of the previous one:

    function new_excerpt_more( $more ) {
        return '' ;
    }
    add_filter('excerpt_more', 'new_excerpt_more');
    Thread Starter Boris

    (@ispacecrusader)

    Hi Eugene,

    I added the function, but it changes nothing. For some reason, the excerpt function responds differently within Gutenberg blocks. I see the same with the Spectra post grid which I also use on the same site.

    Plugin Support eugenewhite

    (@eugenewhite)

    Hello Boris.

    Well, I just double-checked the code with one of the default WordPress themes, the “Twenty Twenty-Two” one – everything seems to be working properly. So have you tried to use the code with this theme or does the issue appears with the Astra theme only? Please let me know.

    Thread Starter Boris

    (@ispacecrusader)

    Hi @eugenewhite ,
    you seem to be right! I’ve tested with 2022 and OceanWP themes, and then it works as intended. I will contact Astra support about this, and post relevant updates here.

    Plugin Support eugenewhite

    (@eugenewhite)

    Hello Boris.

    Okay. In case you have any additional questions, let me know.

    Thread Starter Boris

    (@ispacecrusader)

    Hi @eugenewhite ,
    Astra support has been able to help me resolve the issue for the Spectra plugin by adding this code to functions.php:

    
    

    function replace_content( $content ) {
    $content = str_replace(array( ‘[…]’, ‘[…]’, ‘…’ ), ”, $content);
    return $content;
    }
    add_filter(‘uagb_single_post_excerpt_grid’,’replace_content’);`
    `

    Is there a similar filter active for Getwid which prevents the normal solution from working?

    Plugin Support eugenewhite

    (@eugenewhite)

    Hello Boris!

    Sorry for the late reply.
    Well, I don’t think that our Getwid has a similar filter that prevents the normal solution from working. But also I’m not sure it may have something to do with the issue since everything seems to be working fine with default WordPress themes.

    Plugin Support eugenewhite

    (@eugenewhite)

    Hello Boris!

    We haven’t heard from you in a while and will mark the topic as “Resolved”.
    In case you have any further concerns, please submit a new one and we’ll be glad to help you out.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Remove three dots from excerpt in Custom Post Type block’ is closed to new replies.