custom-field.html.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php if (!defined('HTMLY')) die('HTMLy'); ?>
  2. <h2 class="post-index"><?php echo i18n('custom_fields');?></h2>
  3. <br>
  4. <p>Custom fields enable users to add extra, specific data fields to their content, allowing for more detailed and flexible content management.</p>
  5. <p>Use <code>get_field()</code> function in your template.
  6. <ul><li>Post, Page, Subpage: <code>&lt;?php echo get_field('field_name', $p-&gt;raw);?&gt;</code></code></li>
  7. <li>Profile: <code>&lt;?php echo get_field('field_name', $author-&gt;raw);?&gt;</code></code></li></ul>
  8. </p>
  9. <table class="table post-list">
  10. <thead>
  11. <tr class="head">
  12. <th>Type</th>
  13. <th><?php echo i18n('Operations');?></th>
  14. </tr>
  15. </thead>
  16. <tbody>
  17. <tr>
  18. <td>Post</td>
  19. <td><a class="btn btn-primary btn-xs" href="<?php echo site_url();?>admin/field/post"><?php echo i18n('edit');?></a></td>
  20. </tr>
  21. <tr>
  22. <td>Page</td>
  23. <td><a class="btn btn-primary btn-xs" href="<?php echo site_url();?>admin/field/page"><?php echo i18n('edit');?></a></td>
  24. </tr>
  25. <tr>
  26. <td>Subpage</td>
  27. <td><a class="btn btn-primary btn-xs" href="<?php echo site_url();?>admin/field/subpage"><?php echo i18n('edit');?></a></td>
  28. </tr>
  29. <tr>
  30. <td>Profile</td>
  31. <td><a class="btn btn-primary btn-xs" href="<?php echo site_url();?>admin/field/profile"><?php echo i18n('edit');?></a></td>
  32. </tr>
  33. </tbody>
  34. </table>