Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8937207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:22:06+00:00 2026-06-15T10:22:06+00:00

In my WordPress blog, I inserted the following content in Description field in add

  • 0

In my WordPress blog, I inserted the following content in “Description” field in add new post form.

sss'ss''ss'''ss"ss""sss"""

I am applying the filter hook(add_filter) the the_content() function as below. Basically I want to display non spaced words if it exist more than 50 character means, I would like to give space after 50 characters. So I used wordwrap function to do that. But while use special characters in content I am getting wired output as mentioned below.

function.php

function filter_content($content) {
  global $post;  
     $original = wordwrap($content,50,' ',' ' ); 
  return $original;
}
add_filter( 'the_content', 'filter_content' );

Output :

   sss’ss”ss”’ss”ss& #8221;"sss”"”
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T10:22:06+00:00Added an answer on June 15, 2026 at 10:22 am

    Issue:

    wordwrap function is converting special charters(quotes, double quotes and etc..) into html entity and count as a string.50 character occurrence happen between & and # from ”. While it divide that we got output as & #8221;.

    Solution:

    Instead of php just try css solution word-wrap property. So apply word-wrap:break-word; style to your paragraph tag. break-word value will force to break the word. But there is no option to give numbers like 50 and all. It will wrap depends on container width.

    p{
     word-wrap:break-word; 
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

On my Wordpress blog, I want to show additional content to people from Finland
My wordpress blog contains the following Page hierarchy: - page 1 L page 1.1
I'm starting a Wordpress Blog that will have adult content on it, so I'll
I'm migrating my WordPress blog and phpBB Forum into a new hosting server. I
Hey I have a wordpress blog, and I need to add some negative margin
I have a wordpress blog.I Want to add Facebook like Button &Facebook Share button
I am creating a wordpress blog that has small boxes for each post thumbnail.
In my wordpress blog, I want to make a specific post open a specific
I installed a new wordpress blog today (v3.4.2, Windows 2008 R2, IIS7.5, SQL Server
my wordpress blog is about musics, and everytime i post a music in my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.