=== WPYog Documents === Contributors: wpyog Donate link: https://poppinsdigital.com/ Tags: documents, document management, pdf, file download, document library Requires at least: 5.0 Tested up to: 7.0 Stable tag: 1.5.0 Requires PHP: 7.0 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Upload, organize, and display documents (PDF, Word, Excel, PowerPoint) on any page using a simple shortcode. == Description == WPYog Documents is a free, versatile WordPress document listing and management plugin. Upload, organize, and display PDF, Word, Excel, PowerPoint, and any other file type directly from your WordPress dashboard using a simple shortcode. [View Live Demo](https://demo.poppinsdigital.com/wpyog-documents/) **Key Features** * Display documents on any post, page, or widget area using the `[wpyog-document-list]` shortcode * Organize documents into categories * Filter, sort, and limit the document list via shortcode attributes * Secure file downloads via nonce-verified AJAX * Supports all common file types: PDF, DOCX, XLSX, PPTX, images, audio, video, zip archives, and more * No programming knowledge required — works out of the box **Shortcode: [wpyog-document-list]** Place this shortcode on any post or page to list documents. Available attributes: * `category` — filter by category ID. Example: `[wpyog-document-list category="7"]` * `desc` — show/hide description. `1` = show, `0` = hide. Example: `[wpyog-document-list desc="1"]` * `date` — show/hide upload date. `1` = show, `0` = hide. Example: `[wpyog-document-list date="1"]` * `orderby` — field to sort by. Accepts `date`. Example: `[wpyog-document-list orderby="date"]` * `order` — sort direction. `DESC` or `ASC`. Example: `[wpyog-document-list order="ASC"]` * `download` — show/hide download button. `1` = show, `0` = hide. Example: `[wpyog-document-list download="1"]` * `limit` — maximum number of documents to show. Example: `[wpyog-document-list limit="5"]` * `columns` — number of columns (1–4). Default is 1. Example: `[wpyog-document-list columns="2"]` To display a single document, use the `[wpyog-document]` shortcode: * `id` — document ID to display. Example: `[wpyog-document id="4"]` **Supported File Types** * Microsoft Word (DOC, DOCX, DOCM, DOTM, DOTX) * Microsoft Excel (XLS, XLSX, XLSB, XLSM) * Microsoft PowerPoint (PPT, PPTX, PPSX, PPS, PPTM, POTM, PPAM, POTX, PPSM) * Adobe PDF * Images (PNG, JPG, GIF, WEBP, SVG) * Audio (MP3, WAV) * Video (MP4, WEBM, AVI, MOV, WMV) * Archives (ZIP, RAR, TAR, GZ, 7Z) * Plain text and more == Installation == 1. Download the plugin and unzip it. 2. Place the `wpyog-documents` folder in your `wp-content/plugins` folder. 3. Activate the plugin from the Plugins tab of your WordPress admin. 4. Go to **WPYog Documents** in the admin menu and add your documents. 5. Place `[wpyog-document-list]` on any post or page to display documents. You can find each document's ID in the Shortcode column of the Documents list in your admin. == Frequently Asked Questions == = Can I request a feature? = Yes — we'd love to hear from you. = Does it support all file types? = Yes. Any file you can upload to WordPress can be listed. Icons are shown for the most common types. = Is it compatible with page builders? = Yes. The shortcode works in any editor or page builder that supports WordPress shortcodes. == Screenshots == 1. WPYog Documents List — admin view of all uploaded documents with shortcode column. 2. Add / Edit Document — upload a file and set title and description from the admin. 3. Shortcode Generator — live admin tool to build shortcodes with all parameters and one-click copy. 4. Document List (Frontend) — card-row layout with color-coded file type icons and download buttons. 5. Single Document (Frontend) — individual document box with left accent border and description. 6. Category Document List (Frontend) — filtered list with date badge, download button, and description. == Changelog == = 1.5.0 = New Features * Added `columns` shortcode attribute — display documents in a 2, 3, or 4 column grid layout. Example: `[wpyog-document-list columns="2"]`. Responsive: collapses to 2 columns on tablet, 1 column on mobile. * Added live Shortcode Generator admin page (replaces static Shortcode Reference). Includes category dropdown populated from real categories, columns selector, limit, sort, and display options with a one-click copy button. * Added "More Plugins" section to the Shortcode Generator page showcasing WPYog Team, WPYog News, and poppinsdigital.com. Design / CSS * Complete frontend CSS redesign — replaced plain bullet list with a professional card-row layout. * Color-coded file type icon badges: PDF (red), Word (blue), Excel (green), PowerPoint (orange), Images (purple), ZIP (yellow). * Hover effects: accent left-bar, icon scale, download button lift shadow. * Download action rendered as a pill icon button with aria-label. * Date displayed as a rounded badge. * Description shown with a light hairline separator. * Single document box styled with left accent border and hover lift shadow. * Fully responsive — mobile (≤768px) collapses all layouts to 1 column; tablet (≤900px) collapses 3–4 columns to 2. Admin UX * Admin sidebar menu label changed from "WPYog Documents" to "Documents". * Admin sidebar icon now renders correctly on all admin pages (not just document screens). * Updated Author and Author URI to poppinsdigital.com. * Updated plugin description shown in the WordPress Plugins list screen. * Shortcode column in the document list retained for quick copy. Bug Fixes * Fixed missing `wp_reset_postdata()` after both WP_Query loops — was corrupting the global `$post` for anything rendered after the shortcode. * Fixed incorrect `esc_html()` on an array in the single document shortcode. * Fixed `wpautop()` wrapping shortcode output — was injecting `
` tags inside `