How to disable automatic formatting in WordPress posts
Do you want to disable automatic formatting in WordPress posts?
By default, WordPress formats text to replace quotes with beautiful quotes and cleans up the text. This prevents the user from displaying code, raw text, and CSS/Javascript code examples.
In this article, we will show you how to disable automatic formatting in WordPress posts.
Why disable WordPress format in WordPress posts?
WordPress has built-in text cleaning. This feature replaces quotes with fancy quotes and removes other tags that may be needed to display HTML, CSS, or JavaScript.
There are a variety of ways to easily display code in WordPress, which allow you to skip the default format. You can view them in our article on how to display code in WordPress.
However, some advanced users may want to completely disable WordPress automatic formatting on their websites. This will allow them to easily skip WordPress format checks and display original text on their website if needed.
That being said, let's see how to easily disable automatic WordPress formatting on your website. We will show you two ways so that you can choose the one that best suits your needs.
Method 1. Manually disable automatic formatting in WordPress
This method requires you to add custom code to your WordPress website. If you haven't done this before, check out our guide on how to copy and paste custom code snippets in WordPress.
First, you need to paste the following code into the functions.php file or code snippet plugin of the theme.
Next, you can add a title to the code snippet, which can be anything that helps you remember the purpose of your code. Then, just paste the above code into the Code Preview box and select PHP Fragment as the code type from the drop-down menu.
Finally, switch the switch from Inactive to Active and click the Save Fragment button at the top of the page.
If some text is included in the original shortcode, the above code tells WordPress to skip the formatting option.
Now to add the skip WordPress format, you need to add the HTML block to the WordPress Post Editor. In the post editor, you can add unformatted text or code to the original shortcode.
The downside of this approach is that it doesn't work well with the block editor. Even within an HTML block, its behavior may occur unexpectedly.
Method 2. Use the plugin to disable automatic formatting in WordPress
This method is simpler, but requires you to use an older classic editor plugin. The main drawback of this approach is that it can cause confusion if you decide to start using the block editor in the future.
First, you need to install and activate the classic editor plugin. For more details, see the guide on how to disable the block editor in WordPress.
After that, you need to install and activate the Raw HTML plugin. For more details, see our step-by-step guide on how to install WordPress plug-ins.
After that, you can create new posts or edit existing posts. On the post editing screen, you need to switch to text mode and add unformatted text in the original shortcode.
You can now publish or save changes and preview them to see the actual effect of unformatted text.
We hope this article helps you understand how to disable automatic formatting in WordPress posts. You may also want to check out our complete WordPress security guide or check out our tips for improving blog posts SEO.
The above is the detailed content of How to disable automatic formatting in WordPress posts. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

WorldCoin (WLD) stands out in the cryptocurrency market with its unique biometric verification and privacy protection mechanisms, attracting the attention of many investors. WLD has performed outstandingly among altcoins with its innovative technologies, especially in combination with OpenAI artificial intelligence technology. But how will the digital assets behave in the next few years? Let's predict the future price of WLD together. The 2025 WLD price forecast is expected to achieve significant growth in WLD in 2025. Market analysis shows that the average WLD price may reach $1.31, with a maximum of $1.36. However, in a bear market, the price may fall to around $0.55. This growth expectation is mainly due to WorldCoin2.

HTML, CSS and JavaScript are the core technologies for building modern web pages: 1. HTML defines the web page structure, 2. CSS is responsible for the appearance of the web page, 3. JavaScript provides web page dynamics and interactivity, and they work together to create a website with a good user experience.

Litecoin (LTC) price plummeted to $65 in early April, down nearly 7.5% in a week, echoing the plunge in the wider cryptocurrency market. The market crash caused billions of dollars to evaporate market value, Bitcoin (BTC) fell below $75,000, and altcoins generally fell. Macro factors such as rising U.S. Treasury yields and expected interest rates appear to intensify risk aversion in global markets. In addition, the large outflow of funds from Bitcoin spot ETFs further hits the confidence of retail investors and institutional investors. Against this backdrop, Litecoin is once again facing its long-term resistance level - the 200-week exponential moving average (EMA). The EMA had suppressed LTC prices in July 2023, when the price was close to $88. Historically, LTC and the

Exchanges that support cross-chain transactions: 1. Binance, 2. Uniswap, 3. SushiSwap, 4. Curve Finance, 5. Thorchain, 6. 1inch Exchange, 7. DLN Trade, these platforms support multi-chain asset transactions through various technologies.

In the volatile cryptocurrency market, investors are looking for alternatives that go beyond popular currencies. Although well-known cryptocurrencies such as Solana (SOL), Cardano (ADA), XRP and Dogecoin (DOGE) also face challenges such as market sentiment, regulatory uncertainty and scalability. However, a new emerging project, RexasFinance (RXS), is emerging. It does not rely on celebrity effects or hype, but focuses on combining real-world assets (RWA) with blockchain technology to provide investors with an innovative way to invest. This strategy makes it hoped to be one of the most successful projects of 2025. RexasFi

Bitcoin price has experienced multiple cycles of fluctuations and growth. 1. From 2013 to 2014, the price soared from less than $10 to $1,150, and then plummeted to $200. 2. From 2015 to 2016, prices stabilized and rebounded, and infrastructure improvements enhanced market confidence. 3. From 2017 to 2018, the price plummeted to US$3,000 after exceeding US$20,000, and the tightening of China's regulatory policies caused an impact. 4. From 2019 to 2021, the price rebounded to more than US$10,000, and exceeded US$60,000 in 2021, and institutional investors entered the market to drive the rise. 5. From 2022 to 2024, the price rebounded to $50,000 after the market correction, and the launch of US ETFs brought new funds. 6. At the beginning of 2025, the price is around 1

Galaxy Digital Holdings has been approved by the U.S. Securities and Exchange Commission (SEC) to officially launch the restructuring plan! Galaxy Digital has been approved by the SEC, and its Nasdaq listing and corporate structure restructuring plan has officially entered the next stage. The news was announced on Monday. The SEC has approved the registration statement for Galaxy Digital. The move is a key step in the company's plan to move its corporate structure from the Cayman Islands to Delaware, and at the same time, it will set up a new parent company, NewPubCo. "We are excited that the registration statement will take effect, which marks an important milestone in the development of Galaxy Digital and will continue to follow," said the CEO of Galaxy Digital.

Cryptocurrency market turmoil has intensified, and Cardano (ADA) has fallen below key support levels, raising concerns among investors. This article will analyze the recent performance of ADA and compare the strong growth momentum of another cryptocurrency, Coldware (COLD). ADA prices have continued to decline in the past five months, falling below the $0.61 support level on April 7, 2025, triggering volatility in the overall cryptocurrency market. At the same time, Coldware (COLD)'s pre-sale performed well, with financing of US$2.4 million in the second phase. So, what are the advantages of Coldware compared to Cardano? Coldware rises against the trend. In the same market environment where ADA prices fall, Coldware(C
