问题描述:

I have two type of data in my theme:

1. I have data that includes the schedule of some departments,

2. and other data are employees of some department.

Now I have too many departments to display in navigation menu, so i am using pages to display them. So when I Add New Page:

  1. I am using title of the page for the name of Department
  2. The body of page for the content to show description of Department
  3. Custom Field for the schedule of department
  4. and for the name of employees, i dont know what to use !!!

Code for retrieving these is:

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>

<h1 class="section-title"><? wp_title('');?></h1>

<?if (has_post_thumbnail()) {

the_post_thumbnail();

}

?>

<?php the_content();?>

<?php endwhile; else: ?>

<?php endif; ?>

and for schedule

 <h1 class="section-title">SCHEDULE</h1>

<?php the_meta(); ?>

Now the best solution for name of employees it would be to have a clone of the Custom Field plugin in this "Add New Page admin", so it is possible to achieve this thing ???

网友答案:

You can create a custom field and that would be enough to serve your purpose. Use this simple plugin it will be very easy for you to create a custom field. See this screenshot section of the plugin.

https://wordpress.org/plugins/advanced-custom-fields/screenshots/

相关阅读:
Top