In the form you have posted this is more of PHP question – you could use strlen()
functions to determine length of original title and apply ellipsis conditionally.
However in WP context you should consider using wp_trim_words()
since trimming based on words looks tidier and it will take care of appending string of your choice whet cutting.
Related Posts:
- C++ – how to find the length of an integer
- How can I make a PHP counter?
- Counting the posts of a loop (WP_Query)?
- Category and children post count
- Hide the post count behind Post Views (Remove All, Published and Trashed) in Custom Post Type
- How to display 2 equal columns of li based on the count of items in wp_nav_menu divided by 2?
- Show weekly posts statistic in WordPress
- Increasing post view count automatically [duplicate]
- Count number of posts by author in a category
- How to limit the max number of characteres in the title that are displayed
- How we count the user draft posts
- What is the best way to count and display the number of posts?
- apply_filters/do_action tag characters limit
- limit characters when posting from form
- How do I shorten the title lenghs with Elementor theme? [closed]
- register_post_type name character limit
- Get count of terms with a post and another taxonomy term?
- Adding character count and limit in comments, modifying labels and fields – jetpack
- Get Gravity Forms field values and count how many? [closed]
- Limit image upload
- Counting posts in custom post type by author
- Get total views of all posts by author
- Count post + add number =
- How to do simple addition to increase favorites count of my wordpress posts
- Count posts published in one particular day: the lighter way
- What is the best way to do this? [closed]
- Search Count WordPress Theme
- How to read out the excerpt length (for if-condition)
- $count_posts->draft & published
- Fixed height of the_content()
- Allow a specific user role I have created to only upload one image to his media library
- CountPost WordPress Custom Taxonomy
- get the count of table rows
- How to calculate posts number? [closed]
- How make animation increase of number
- Having problems getting the number of plays in a WordPress Playlist from an audio file
- How to show the amount of post that have on the site?
- Limit username to specific characters (A-Z and 0-9)
- Truncating characters in Advanced Custom Fields works some places but not others?
- Adding a posts count in archive pages
- Adding count also to parent categories
- Counting the number of elements with the values of x in a vector
- PHP 7.2 – Warning: count(): Parameter must be an array or an object that implements Countable
- How can I count the occurrences of a list item?
- How to count the occurrence of certain item in an ndarray?
- Pandas ‘count(distinct)’ equivalent
- How to sort a list of objects based on an attribute of the objects?
- Count the number of occurrences of a character in a string
- Calculate average in java
- Elasticsearch: Max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
- Counting the occurrences / frequency of array elements
- Count how many files in directory PHP
- Repository size limits for GitHub.com
- How to count the number of files in a directory using Python
- How to find length of digits in an integer?
- MySQL – UPDATE query with LIMIT
- select count(*) from table of mysql in php
- How to get the count of each distinct value in a column?
- How to count instances of character in SQL Column
- How to fix the “508 Resource Limit is reached” error in WordPress?
- If a hacker changed the blog_charset to UTF-7 does that make WordPress vulnerable to further attacks?
- How to mark every 3rd post
- Remove more or […] text from short post
- Return only Count from a wp_query request?
- Count & Display Database Queries
- Count posts within a custom post type and specific taxonomy and terms?
- Strange characters – despite everything being UTF-8
- How to Display a List of Users Who Have Made at Least 1 Post?
- Can I hook into user registration *before* a user is created?
- Changing the username character limit from four to less characters
- Decrease file size upload in Media
- How to Display Network Post Count?
- Wordspress add into my javascripts
- Problem with Hebrew characters in username
- Customizing get_the_excerpt() to specific length and “Read More” output.
- Different number of posts in each category
- excerpt in characters
- Taxonomy count per Post type
- How to Add Customizer Setting in Child Theme
- WP 3.5 and Galleries – how to count images?
- How can I limit the number of comments per registered user per day?
- (un)wptexturize() — is it possible?
- Ability to set character limit in BuddyPress?
- Special characters in WordPress UTF-8 [closed]
- Count the number of images uploded on the website
- Limiting the number of users
- How can I stop TinyMCE from converting my HTML entities to characters?
- Total word count for posts by one author
- Set a maximum upload count for users on a specific user role
- How to cache a shortcode functions output?
- show number of open comments on custom dashboard
- count posts from custom taxonomy terms by year
- Count posts or custom post types from last 24 hours (or from today)
- Comment Count for each Comment Author
- limit the words in the post content and add read more link
- Display user’s total comment count outside The Loop
- How to limit user to publish post per day and per role?
- Stop users from logging in from multiple locations
- Is there a limit on the size of a WP page?
- strange characters in wordpress website displayed for visitors [closed]