• Resolved moseskerub

    (@moseskerub)


    My website is in hebrew, the problem is that the ‘read more’ slug string ‘testimonial’ get translated to Hebrew for some reason, hence breaking the link

    ** instead of linking to website.com/testimonial/persons-name , it’s linking to website.com/????/persons-name

    you can see it in action in the link attached, the left column (the pinky one) has testimonials with a read more link

    BTW, is it possible to make the ‘full name’ field link to the full testimonial page?

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Chris Dillon

    (@cdillon27)

    The slug is in the translation files. Some people want to translate the slug and some do not. Until I can devise a more flexible solution, add this to your theme’s functions.php or create an mu-plugin or use a plugin like Code Snippets.

    function my_testimonial_post_type( $args ) {
    	$args['rewrite']['slug'] = 'testimonial';
    	return $args;
    }
    apply_filters( 'wpmtst_post_type', 'my_testimonial_post_type' );

    Then reset permalinks by going to admin > Settings > Permalinks and simply clicking “Save Changes”.

    Another option is overriding the plugin translation files. Here’s an example.

    • This reply was modified 6 years, 10 months ago by Chris Dillon.
    Plugin Contributor Chris Dillon

    (@cdillon27)

    There is not an option for linking the name field.

    Plugin Contributor Chris Dillon

    (@cdillon27)

    I made a mistake. That code should be:

    function my_testimonial_post_type( $args ) {
    	$args['rewrite']['slug'] = 'testimonial';
    	return $args;
    }
    add_filter( 'wpmtst_post_type', 'my_testimonial_post_type' );

    Of course, change the word testimonial to your preferred translation.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘read more link is broken’ is closed to new replies.