This topic contains 2 replies, has 2 voices, and was last updated by sank 5 years, 12 months ago.
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.
Home › Forums › Product Support Forums › Related Posts Pro for WordPress Support › character limit on titles
This topic contains 2 replies, has 2 voices, and was last updated by sank 5 years, 12 months ago.
hi can we have a character limit on titles so they are not so long, and have a “…” after something like 40 characters?
Hi,
Yes, it is possible with a small modification and a custom code. Follow the steps below, I will try to guide you. If you need help with editing the files, you can fill the ticket details with FTP access, and I will do it for you.
1. Open up the wp-content\plugins\related-posts-pro\includes\related_content.class.php file on your server and change line 1514 from this:
$this->post[$key] = apply_filters('rpp_item_after_postprocessing', $post);
to this:
$this->posts[$key] = apply_filters('rpp_item_after_postprocessing', $this->posts[$key]);
2. Then add this code snippet to the functions.php file in your active theme directory (copy from line 4):
3. Open the plugin settings and save them without changing anything, so the cache will be cleared.
The titles should appear trimmed now.
Best,You must be logged in to reply to this topic.
Cookie | Duration | Description |
---|---|---|
cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |