Farmers Floor Plans
Farmers Floorplans WordPress Plugin
by Nemanja Tanaskovic · github.com/nemanjatan/farmers-floorplans · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/nemanjatan/farmers-floorplans/archive/refs/heads/main.zipFarmers Floor Plans Plugin
A WordPress plugin that scrapes and displays property listings from AppFolio, specifically for Farmer's Exchange building.
Features
- Scrapes listings from AppFolio listings page
- Filters by building name (Farmer's Exchange 580 E Broad St.)
- Stores listings as custom post types
- Auto-syncs daily at configurable time
- Manual sync option in WordPress admin
- Downloads and optimizes images locally
- Displays floor plans in a clean grid layout
- Featured floor plans section for homepage
- Image lazy loading for performance
- Query caching for faster page loads
Installation
- Upload the
farmers-floorplansfolder to/wp-content/plugins/ - Activate the plugin through the 'Plugins' menu in WordPress
- Go to Settings → Farmers Floor Plans to configure
Configuration
In the admin settings page, you can configure:
- AppFolio List URL: The URL to scrape listings from (default: https://cityblockprop.appfolio.com/listings)
- Building Filter: Text to filter listings by (default: Farmer's Exchange 580 E Broad St.)
- Daily Sync Time: Time to run automatic daily sync
- Auto-create Page: Create Floor Plans page on activation
Usage
Main Shortcode - Floor Plans Grid
Display floor plans on any page or post with filters and sorting:
[farmers_floor_plans]
Shortcode Parameters:
featured="1"- Show only featured floor planslimit="12"- Number of floor plans to display (default: 12)show_filter="yes"- Show filter sidebar (default: yes)show_sort="yes"- Show sorting dropdown (default: yes)beds="2"- Filter by number of bedroomsmin_price="500"- Minimum price filtermax_price="1000"- Maximum price filterorderby="date"- Order by field (date, price_asc, price_desc, sqft_asc, sqft_desc)
Common Usage Examples:
[farmers_floor_plans limit="12"]
[farmers_floor_plans beds="2" min_price="600" max_price="1200"]
Featured Floor Plans Shortcode
Display featured floor plans in a full-width 5-column grid (perfect for home page):
[farmers_featured_floor_plans]
Shortcode Parameters:
limit="5"- Number of featured floor plans to display (default: 5)
Example:
[farmers_featured_floor_plans limit="5"]
Features:
- Full-width 5-column grid on desktop
- Responsive (4 cols → 3 cols → 2 cols → 1 col)
- Shows floor plans marked as "Featured" in admin
- Falls back to most recent posts if no featured posts exist
- No filters or sorting UI (clean presentation)
👉 See FEATURED_FLOORPLANS.md for complete documentation
Setting Featured Listings
To mark floor plans as featured:
- Go to Floor Plans → All Floor Plans in WordPress admin
- Look for the ⭐ Featured column
- Edit any floor plan you want to feature
- Check the "Feature on homepage" checkbox in the Floor Plan Details meta box
- Save the post
Featured floor plans will:
- Show a ⭐ in the admin list
- Appear in the
[farmers_featured_floor_plans]shortcode - Can also be filtered in the main grid using
featured="1"
Admin List Columns
The admin Floor Plans list includes these helpful columns (all sortable):
- Unit # - Extracted from address (e.g., "302" from "580 E Broad St - 302")
- ⭐ Featured - Star icon for featured posts
- Bedrooms - Number of bedrooms
- Bathrooms - Number of bathrooms
- Sq Ft - Square footage
- Price - Monthly rent
- Address - Full address
- Available - Availability date/status
- Active - Whether the listing is active
Click any column header to sort by that field.
Manual Sync
To manually trigger a sync:
- Go to Settings → Farmers Floor Plans
- Click the "Sync Now" button
- Check the status panel for results
Data Model
Custom Post Type: floor_plan
Meta Fields:
_ffp_source_id- Unique identifier for upsert_ffp_building- Building name_ffp_address- Property address_ffp_price- Rent price_ffp_bedrooms- Number of bedrooms_ffp_bathrooms- Number of bathrooms_ffp_sqft- Square footage_ffp_available- Availability date/status_ffp_active- Active status (0 or 1)_ffp_featured- Featured on homepage (0 or 1)_ffp_gallery_ids- Array of attachment IDs_ffp_source_url- Original AppFolio URL
Template Files
The plugin includes custom templates:
templates/archive-floor_plan.php- Archive page templatetemplates/single-floor_plan.php- Single floor plan templatetemplates/parts/card-floor-plan.php- Card component
Cron Schedule
The plugin schedules a daily sync using WordPress cron. Default time is 3:00 AM.
To customize:
- Go to Settings → Farmers Floor Plans
- Set your preferred sync time
- Save settings
Performance
- Query caching with 10-minute TTL
- Custom image sizes for cards (600x400)
- Lazy loading on images
- No remote requests on frontend
Security
- Nonce verification on all forms
manage_optionscapability required for admin access- Input sanitization on all fields
- Output escaping in templates
Troubleshooting
No listings showing
- Check if sync has run successfully
- Verify building filter text matches your listings
- Check logs in admin for errors
- Ensure listings contain the filter text in address or title
Images not downloading
- Check server write permissions
- Verify image URLs are accessible
- Check logs for specific error messages
Selector drift warning
If you see "zero listings parsed" but the page fetched correctly, the HTML structure may have changed. Check the parser
selectors in includes/class-parser.php.
Development
File Structure
farmers-floorplans/
├── farmers-floorplans.php
├── includes/
│ ├── class-cpt.php
│ ├── class-admin.php
│ ├── class-sync.php
│ ├── class-parser.php
│ ├── class-render.php
│ ├── class-images.php
│ └── class-logger.php
├── templates/
│ ├── archive-floor_plan.php
│ ├── single-floor_plan.php
│ └── parts/
│ └── card-floor-plan.php
└── assets/
├── admin.css
├── admin.js
├── front.css
└── front.js
Version
1.0.0
Author
Nemanja Tanaskovic
License
Proprietary - Developed for Farmers Athens