Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

172
Views
Delete/Hide last X amount of characters in <p> tag

I'm using a WP plugin and had no luck exploring source code specific to the plugin (Blog Filter Premium). It is automatically adding an ellipsis to the end of my description in a <p> tag, however, I don't believe it is using any CSS to do this as the ellipsis are actually in the html/paragraph itself.

<p class="blog_description">Here is an example of my description with a period at the end and then subsequent ellipsis automatically being added....</p>

Is there a way with CSS or to inject <script> into the <head> to have my .blog_description paragraphs remove the final 3 characters or hide them? Or at the very least color them white so that I can get rid of these ellipses?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I suppose you could split the string by the delimeter ('...'), remove the last item, then join it back together again.

let srch = '...';
document.querySelectorAll('.blog_description').forEach(el => {
  if (el.innerText.indexOf(srch) > -1) el.innerText = el.innerText.split(srch).slice(0, -1).join(srch);
})
<p class="blog_description">Here is an example of my description with a period at the end and then subsequent ellipsis automatically being added...</p>

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!