WordPress article and page exchange WordPress

WordPress article and page exchange

Sometimes you may be ready to convert one or more pages into articles. Please refer to the following methods. Add code to the current topic function template functions.php: convert a single page to an article//ID of the page $page_id=123;//
WordPress

The picture is king and the title is emperor

I don't know which aunt summed up SEO as "content is king and the outer chain is king". High quality content can attract users, and is conducive to search engine optimization and good rankings. But the text has nothing to do with the previous, but simply talks about how to make visitors interested in starting a website. Recently, I visited an article
five hundred and ninety-eight million eight hundred and forty-five thousand and six
 Remove WordPress 6.5 block template menu item WordPress

Remove WordPress 6.5 block template menu item

WordPress 6.5 adds a new block template menu item in the appearance menu. This block template can combine different blocks into a new block template for easy reuse. If you don't use the block editor and you want to hide it, you can use the following code
 Add a copy button to the WordPress theme WordPress

Add a copy button to the WordPress theme

Sometimes you may need to add a copy button in the WordPress theme to facilitate users to copy links or verification codes. Here is a simple copy code for reference. Html code:<div class="copy box">
 The simplest way to generate posters for WordPress articles WordPress

The simplest way to generate posters for WordPress articles

I don't know when the domestic WordPress themes have been equipped with the article poster generation function, which has become the standard configuration. I'm too embarrassed to sell them. Of course, it also includes my own theme. It looks very tall, but personally, like the theme night mode, it seems to have useful functions and costs a lot
 Unable to display 404 pages of WordPress theme WordPress

Unable to display 404 pages of WordPress theme

Symptoms: the 404 page of WordPress theme cannot be displayed, but the 404 file default to the host is displayed. If the 404.html file in the root directory of the website is deleted, a blank page is displayed. Solution: Open the pagoda panel → Website → Site → Settings → Configuration
 Disable WordPress auto draft WordPress

Disable WordPress auto draft

This is a commonplace problem. The reason why WordPress has designed this automatic draft function is that when multiple users create new articles at roughly the same time and save and publish articles, the article ID may be the same, and the last saved and published article will overwrite another article. To prevent this
 Keep WordPress articles in text editing mode WordPress

Keep WordPress articles in text editing mode

Sometimes you need to input some HTML code in an article. Generally, we switch to text editing mode, but when you switch to visual mode to publish an updated article, these HTML codes will be filtered out by WordPress and lost. How to prevent misoperation and switch to visual mode
 Shielding SemrushBot and other foreign garbage marketing spiders WordPress

Shielding SemrushBot and other foreign garbage marketing spiders

Recently, I made a search record function to collect users' preferences. It was found that there are often inexplicable search records, and there are about 1000 searches every day. The search provided by WordPress is very resource consuming. Open the website log and find that there are many foreign spam marketing spiders
 Forbid parsing short code in articles WordPress

Forbid parsing short code in articles

If you are a developer of a WordPress theme or plug-in, I may have been troubled by the same problem. That is, you need to add short code to the article to explain how to use short code, but the current theme has included this short code function. After adding short code, it will run parsing directly
 How to call the settings of the gadget in other places WordPress

How to call the settings of the gadget in other places

In some cases, you need to call the setting value of a gadget elsewhere, such as the number of articles, and how to implement it. The following is a simple example for developers only. For example, the registered gadget name is: latest_article_widget. This gadget sets the article
 Customize WordPress error styles and content WordPress

Customize WordPress error styles and content

The wp_die() function is a supplement of WordPress to the PHP die() function. It is used to display HTML error messages. For example, when the author role wants to access the topic page, it will display "Sorry, you can't access this page" and terminate the access. If you want to customize the style and content of the prompt