Why do we need to customize aggregation pages? Because of the need for SEO page clustering.
method:
1. First, customize an empty page and replace it with the original page, so that the slug of the original page can be customized.
2. But you will soon find that your aggregated page will not scroll through pages like the default page, and after a lot of tinkering, you will find that it cannot achieve the original effect.
At this point, you decide to write short code. After writing it, the style is ugly, the logic is extremely chaotic, and the worst thing is that the URL was originally static, but now it has become dynamic, which affects SEO! Then adjust it. After a quick operation, it didn't work out at all. In the end, I went to use a few plugins! Plug ins are like tigers, but slow down performance.
What should we do then?
Open the backend and find the archive entry, pry open its core files, and you will find that it has bound the pagination of posts with global queries. Only when performing global queries can its pagination function be activated!
Knowing this principle makes solving problems easier. We customize a query variable and assign it to a global variable, which triggers the automatic pagination function and perfectly solves the three terminal problem. Then destroy his triggering logic, and it won't affect your other modules anymore! Why? Because after using the trigger, we have already destroyed the logic, so it will not affect the functionality of other modules. #Foreign Trade Website # Foreign Trade Independent Website # Website Production # Website Construction # Web Page Production # Website Design # Front end Interview Questions
|