makeing a terms of use page that is part of the theme

admin2025-06-04  3

I need to make a "terms of use" page. The only way I see to do so involves the user needing to manually add a page in the admin. But I need to implement it as an integral part of the theme. Is there a way to create a custom template file and create a link that will que Wordpress to access it without needing to manually add a page for it? Is there a way to programaticaly add pages to a wordpress site through the theme's functions.php file.

I need to make a "terms of use" page. The only way I see to do so involves the user needing to manually add a page in the admin. But I need to implement it as an integral part of the theme. Is there a way to create a custom template file and create a link that will que Wordpress to access it without needing to manually add a page for it? Is there a way to programaticaly add pages to a wordpress site through the theme's functions.php file.

Share Improve this question edited Jan 10, 2019 at 5:07 fuxia 107k39 gold badges255 silver badges461 bronze badges asked Jan 9, 2019 at 22:15 Meyer AuslanderMeyer Auslander 1134 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

There is no need to create a new template file in order to create a terms of use page. I implemented what I need by simply modifying index.php. The "terms of use" page is accessed by linking to http://homeurl?section=terms. Then add php code in index.php to check if $_Get["section"] == 'terms'. If so display the markup for "terms of use". If not then, display the regular home page.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1749012748a315610.html

最新回复(0)