Add tag to blog post

  • This seems like it may be very basic, or I'm missing something. But I can't seem to be able to add a 'Tags' field to blog posts.

    I imported a blog from wordpress which included Categories and Tags; the categories worked great and the tags were imported too. I can see them when I use <?php perch_blog_post_tags(perch_get('s')); ?>


    But how to I add tags to post.html or edit the ones attached to my existing posts?

  • drewm

    Approved the thread.
  • But how to I add tags to post.html

    They are not included by default. You can include them with the each option:


    PHP
    1. perch_blog_custom([
    2. 'template' => 'post.html',
    3. 'filter' => 'postSlug',
    4. 'value' => perch_get('s'),
    5. 'count' => 1,
    6. 'each' => function($item) {
    7. $item['tags'] = perch_blog_post_tags($item['postSlug'], 'post_tag_link.html', true);
    8. return $item;
    9. },
    10. ]);


    And in your template:


    HTML
    1. <perch:blog id="tags" html>




    or edit the ones attached to my existing posts?

    In the edit form on the control panel, they should be listed under the "Meta and Social" tab