Tag plugin for Anchor CMS based on custom fields. Supports tags for posts and pages while gracefully falling back to normal behavior when no tag is specified.
-
In the AnchorCMS admin panel navigate to
Extend -> Custom Fieldsand add the following fields, making special note of the unique keys:- Post tags
- Type: post
- Field: text
- Unique Key: post_tags
- Label: Tags
- Page tags
- Type: page
- Field: text
- Unique Key: page_tags
- Label: Tags
- Post tags
-
Copy the contents of functions.php into your theme's functions.php file at
anchor/themes/<your_theme>/functions.php. -
In
anchor/themes/<your_theme>/posts.phpreplacehas_posts()withhas_tagged_posts()andposts()withtagged_posts(). -
Tagged page usage may or may not be useful to you and implementation will depend heavily on your theme. Open an issue if you have a specific question or problem.
- Add tags to posts in the Admin panel and separate them using a single space
- Browse posts by tag by appending
?tag=<your_tag>to the end of your posts URL.
Pull requests are welcome. Contact me via Twitter or by opening an issue if you have any problems.