Home > CMS Tutorial > WordPress > body text

How to set html suffix on wordpress article page

下次还敢
Release: 2024-04-15 20:15:14
Original
676 people have browsed it

Set HTML suffix for WordPress post pages: Enable permalinks, select “Custom structure” and enter the code: /%postname%.html. Save changes, refresh permalinks, and check if the article page URL contains the .html suffix. Use the .html suffix only once in the theme to avoid exposing article pages to the REST API.

How to set html suffix on wordpress article page

How to set HTML suffix for WordPress article page

Adding HTML suffix for WordPress article page is relatively simple process to help you manage and organize your content more easily. Here’s how to do it:

Step 1: Enable Permalinks

  • Go to your WordPress dashboard and click on Settings >Permalinks.
  • Select the "Custom Structure" option.
  • Enter the following code in the Custom Structure field:
<code>/%postname%.html</code>
Copy after login

Step 2: Save Changes

  • Click Save Changes button to enable HTML suffixes.

Step 3: Refresh the permalinks

  • Click the "Rebuild All" button to refresh the permalinks of all articles.

Step 4: Check the results

  • Go to your website and see if the URL of the article page already contains the .html suffix.

Tip:

  • Make sure you only use the .html suffix once in your theme.
  • If you encounter any issues, please consult your theme developer.
  • After enabling the HTML suffix, your article pages will no longer be exposed through WordPress’s REST API.

The above is the detailed content of How to set html suffix on wordpress article page. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template