$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'); ?>custom post types - How to create editable sections in wordpress?|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)

custom post types - How to create editable sections in wordpress?

matteradmin9PV0评论

I am making a website for a friend and he doesn't know how to code so I decided to make him a WordPress website which is new to me. I wanna make a homepage that has different sections (About us section, photo gallery section, etc). he might want to change the about us section later in the future or add pictures in the galley. whats the best way to do this?

I have thought about making posts for each section (an about us post and he could just edit it whenever he wants to change the about us section) does that work?

I am making a website for a friend and he doesn't know how to code so I decided to make him a WordPress website which is new to me. I wanna make a homepage that has different sections (About us section, photo gallery section, etc). he might want to change the about us section later in the future or add pictures in the galley. whats the best way to do this?

I have thought about making posts for each section (an about us post and he could just edit it whenever he wants to change the about us section) does that work?

Share Improve this question asked Jan 4, 2019 at 20:52 Borhan SafloBorhan Saflo 31 bronze badge
Add a comment  | 

1 Answer 1

Reset to default 0

Here is what I would recommend.

Use a plugin called Advanced Custom Fields.

This will allow you to build out the admin and have different fields for each section. You could have an editable area with a editor for the about us section. You could use a Repeater Field for the gallery, and much more.

Once you have all the fields in the admin, you just need to pull all the data into your homepage template. This is pretty straight forward and there is good documentation with examples.

This is one of the few plugins I recommend, but when it comes adding custom fields it doesn't make sense to not use it.

Post a comment

comment list (0)

  1. No comments so far