Back to Top

How to change Quotes in WordPress

WordPress is an excellent content management systems. One of the best feature is the availability of hooks.

So here in this article, I’m going to share with you that how to Change the quotation marks that are automatically rendered within your content with using the one of the hook add_filter functionality.

Here, With using the filter you can change existing or used quotation mark from the default English style to any other one you like and main thing is you don’t need to use any plugin for these changes. you just need to follow simple 2-3 steps:

Step 1:

Open your functions.php file which exists in the theme folder in WordPress from admin panel or FTP.

Step 2:

Next, Go to the end of the file and place below code over there,

Here in above PHP code, I have used an add_filter function to change content and title quotes before its render to the browser.

In function ‘render_quotes’, first of all, I have used HTML entities function to convert all characters to HTML entities and then I have decode the same content with html_entity_decode function which returns HTML number for quotation marks. So replaced quotation mark HTML number to HTML name.

That’s it.Great! it is so simple.Here I have taken an example to convert the English quote into german before it renders to the browser.Now Let’s have a look on the front end.

Thanks for reading and feel free to share your thoughts, don’t Forget to Follow us on Twitter or Subscribe us to Get the Latest Updates.

Leave a Reply

Your email address will not be published. Required fields are marked *

Most Popular Posts

How to use MySQL Cursor

Posted on 6 years ago


How to create Bootstrap Switch using CSS

Posted on 2 years ago


How to use Change DB Prefix Plugin

Posted on 5 years ago