How to post to different page on a blog base on LNMP and wordpress


Now we have a blog base on LNMP and WordPress, we have two page named “english” and “chinese”.

I want to click on the English display categories of articles in English and Chinese page in the same way.

step1:Need to create your own page templatee, directly copy a page.php file below the theme folder in the server and add below code in the file head

Save it.

problem0:Cant see the template on page edit after we save it.

solution:Switch to other themes and then switch back.

problem1:In the interface of the theme is only one theme, there is no other theme has been installed.

solution: Because we use lnmp, for security reasons,it closed scandir method,please open it at php.ini file. You can find how to do it by google.

Now, we can see our own templae, choose and apply it.

step2:Let’s associated with the page template with the corresponding category

By click on the category in the background,can get tag_id value in the url,remember the value of different categories.

Then again open our custom template

find out

This line, add content in front of it

then save it

Now,you can by clicking on the page to view the different categories of the post.

A software developer

Leave a Comment

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


This site uses Akismet to reduce spam. Learn how your comment data is processed.