Skip Navigation

[Resolved] Last letter of taxonomy being truncated on front end

This support ticket is created 4 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 1.79 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 2 replies, has 2 voices.

Last updated by simonM-5 4 years, 4 months ago.

Assisted by: Minesh.

Author
Posts
#1704965

Hi Support

The last letter of some of our Taxonomies is being truncated when we view them on the front end. I cannot determine any logic as to why this should be the case. The same taxonomy is showing correctly on some Ads but not on others.

Here are a few examples:

MODES OF TRANSPORT in hidden link is truncated
but MODES OF TRANSPORT works fine in hidden link

CERTIFICATIONS in hidden link
but CERTIFICATIONS works fine in hidden link

Kind regards
Simon

#1705009

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

The issue was with the custom function you have added using which you are display the terms in custom order.

I've adjusted the code as given under - as you can see I've adjusted the last 5-7 lines of code and comment out other lines that is not needed.

add_shortcode( 'get_terms_custom_order', 'get_terms_custom_order_func');
function get_terms_custom_order_func($atts) {
    $a = shortcode_atts( array(
        'id' => '',
        'type' => '',
        'orderby' => '',
        'order' => '',
        'sep' => '<br>'
    ), $atts );
 
    $terms = wp_get_post_terms( $a['id'], $a['type'], array('orderby' => $a['orderby'], 'order' => $a['order']) );
 
    $sep = $a['sep'];
  
//  $output = '';
    $output = array();
    foreach ( $terms as $term ) {
        $output[] = $term->name;
      //  $output .= $sep; 
    }
     return join($sep,$output);
   // return rtrim($output, $a['sep']);
}

I can see its displaying expected output.

#1705263

Hi Minesh. My issue is resolved now. Thank you!