最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Custom theme development additional pages

programmeradmin4浏览0评论

I am developing a new theme based on my html portfolio. I understand the hierarchy and actually have it working 100% in Wordpress. My confusion comes when trying to figure out the best place to put my html. For example I have an about page and a work page; for these I have just created new pages in the wp editor and inserted the html directly. Not sure this is best practice? Also, for home page I created a new page called home; I then used the loop and pulled in the content via the page-home.php file and also created a customized widget area that works as expected on the same file after the content.

I was hoping for some advice on maybe the best practice for handling where to place the html. Should I be using custom page templates? This is a simple 3 page site with no blog.

Thanks in advance for any advice.

I am developing a new theme based on my html portfolio. I understand the hierarchy and actually have it working 100% in Wordpress. My confusion comes when trying to figure out the best place to put my html. For example I have an about page and a work page; for these I have just created new pages in the wp editor and inserted the html directly. Not sure this is best practice? Also, for home page I created a new page called home; I then used the loop and pulled in the content via the page-home.php file and also created a customized widget area that works as expected on the same file after the content.

I was hoping for some advice on maybe the best practice for handling where to place the html. Should I be using custom page templates? This is a simple 3 page site with no blog.

Thanks in advance for any advice.

Share Improve this question asked Jan 17, 2020 at 16:26 user55555user55555 111 silver badge4 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

You should leave the "content" of a page to the actual content, that is text and images. You shouldn't be pasting custom html, as it is very easy to break and hard to maintain. If you have custom html for a page and don't care about editing it yourself directly, you should be using custom page templates.

You can learn about them here:

https://developer.wordpress/themes/template-files-section/page-template-files/

发布评论

评论列表(0)

  1. 暂无评论