Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/drafthorsestudio/document-bookmarks/archive/refs/heads/main.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
Document Bookmarks Plugin - Directory Structure
Visual File Organization Guide
📁 wp-content/
└── 📁 plugins/
└── 📁 document-bookmarks/ ← Create this folder
│
├── 📄 document-bookmarks.php ← Main plugin file
│
├── 📄 README.md ← Documentation
│
├── 📁 blocks/ ← Create this folder
│ └── 📁 document-bookmark/ ← Create this subfolder
│ ├── 📄 editor.js ← Block editor JavaScript
│ ├── 📄 editor.css ← Block editor styles
│ └── 📄 style.css ← Frontend styles
│
└── 📁 assets/ ← Create this folder
└── 📄 frontend.js ← Frontend bookmark functionality
Step-by-Step Installation
1️⃣ Create Main Plugin Folder
📁 /wp-content/plugins/document-bookmarks/
2️⃣ Add Main Plugin File
📁 document-bookmarks/
└── 📄 document-bookmarks.php ← Remember to comment out line 50
3️⃣ Create Blocks Directory Structure
📁 document-bookmarks/
└── 📁 blocks/
└── 📁 document-bookmark/
4️⃣ Add Block Files
📁 blocks/document-bookmark/
├── 📄 editor.js (Gutenberg block code)
├── 📄 editor.css (Editor styling)
└── 📄 style.css (Frontend styling)
5️⃣ Create Assets Folder
📁 document-bookmarks/
└── 📁 assets/
└── 📄 frontend.js (Bookmark button functionality)
6️⃣ Add Documentation
📁 document-bookmarks/
└── 📄 README.md (Optional but recommended)
Final Structure Overview
🔌 WORDPRESS INSTALLATION
│
├── 📁 wp-content/
│ ├── 📁 plugins/
│ │ ├── 📁 document-bookmarks/ ⭐ YOUR PLUGIN
│ │ │ ├── 📄 document-bookmarks.php
│ │ │ ├── 📄 README.md
│ │ │ ├── 📁 blocks/
│ │ │ │ └── 📁 document-bookmark/
│ │ │ │ ├── 📄 editor.js
│ │ │ │ ├── 📄 editor.css
│ │ │ │ └── 📄 style.css
│ │ │ └── 📁 assets/
│ │ │ └── 📄 frontend.js
│ │ │
│ │ ├── 📁 advanced-custom-fields/ (Your ACF plugin)
│ │ └── 📁 other-plugins/
│ │
│ └── 📁 themes/
│ └── 📁 your-theme/
Important Notes
⚠️ File Naming Must Match Exactly
The file paths are hardcoded in the main plugin file, so names must match:
blocks/document-bookmark/editor.jsblocks/document-bookmark/editor.cssblocks/document-bookmark/style.cssassets/frontend.js
✅ Checklist Before Activation
- [ ] Created folder:
/wp-content/plugins/document-bookmarks/ - [ ] Added main file:
document-bookmarks.php - [ ] Commented out line 50 (taxonomy registration)
- [ ] Created subfolder:
blocks/document-bookmark/ - [ ] Added all 3 block files (editor.js, editor.css, style.css)
- [ ] Created subfolder:
assets/ - [ ] Added frontend.js to assets folder
- [ ] Total: 6 files + 3 folders
🎯 Quick Copy Commands (if using terminal)
# Navigate to plugins directory
cd /path/to/wordpress/wp-content/plugins/
# Create plugin directory structure
mkdir -p document-bookmarks/blocks/document-bookmark
mkdir -p document-bookmarks/assets
# Then copy each file to its location
# (Copy the actual file contents from the code provided earlier)
📝 After Installation
- Go to WordPress Admin → Plugins
- Find "Document Bookmarks"
- Click "Activate"
- Test by editing any post/page and adding the "Document Bookmark" block
Troubleshooting
If the block doesn't appear:
- Check that all file paths match exactly as shown
- Verify JavaScript console for errors (F12 in browser)
- Ensure your taxonomy
toolkit-document-categoryexists - Clear browser cache and WordPress cache
If styles don't load:
- Check file permissions (should be 644 for files, 755 for directories)
- Verify URLs are correct in browser network tab
- Try deactivating and reactivating the plugin