$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'); ?>php - Allow user to choose header style|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)

php - Allow user to choose header style

matteradmin9PV0评论

I am working on developing a simple WP theme that our office will use as a starting point for any future projects that come in. My question is this: How would I go about adding functionality that would allow for the user to select from several different pre-built header styles using the native WP Customizer panel? I have seen similar functionality in several popular themes (Linstar, BeTheme, etc.) in their Theme Options panel, and I know that they have created multiple header.php files (header-1.php, header-2.php, etc.), but I was wondering if and how this might be accomplished using the WP Customizer panel. Any help is appreciated.

I am working on developing a simple WP theme that our office will use as a starting point for any future projects that come in. My question is this: How would I go about adding functionality that would allow for the user to select from several different pre-built header styles using the native WP Customizer panel? I have seen similar functionality in several popular themes (Linstar, BeTheme, etc.) in their Theme Options panel, and I know that they have created multiple header.php files (header-1.php, header-2.php, etc.), but I was wondering if and how this might be accomplished using the WP Customizer panel. Any help is appreciated.

Share Improve this question asked Dec 11, 2018 at 21:24 David SennDavid Senn 1
Add a comment  | 

1 Answer 1

Reset to default 0

Do you want this to be an option per page? Or side wide.

If first, look into this: https://www.advancedcustomfields/ If second, look into this: https://blog.templatetoaster/wordpress-settings-api-creating-theme-options/

Articles related to this article

Post a comment

comment list (0)

  1. No comments so far