$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>makeing a terms of use page that is part of the theme|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

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

matteradmin9PV0评论

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.

Post a comment

comment list (0)

  1. No comments so far