Perfect! I’ve added both shortcodes with complete styling to your favorite button system. Here’s what’s now available:

New Shortcodes:

// Auto-detect current post (in recommend CPT pages)
[favorite_button]

// Specify post ID
[favorite_button post_id="123"]

// With custom CSS class
[favorite_button post_id="123" class="my-custom-style"]

1. User Favorites

Usage Examples:

php

// Basic - shows 10 favorites in single column
[user_favorites]

// Customized - 6 favorites in 2 columns
[user_favorites limit="6" columns="2"]

// Advanced options
[user_favorites limit="8" columns="3" show_excerpt="true" excerpt_length="150"]

Parameters:

  • limit – Number of favorites to show (default: 10)
  • columns – Grid layout (1, 2, or 3 columns, default: 1)
  • show_excerpt – Show post excerpts (true/false, default: true)
  • excerpt_length – Excerpt character limit (default: 100)

2. Popular Places

Usage Examples:

php

// Basic - top 5 most favorited with counts
[popular_places]

// Customized - top 10 without counts
[popular_places limit="10" show_count="false"]

// Advanced options
[popular_places limit="8" columns="2" show_count="true" show_excerpt="true"]

Parameters:

  • limit – Number of popular posts to show (default: 5)
  • show_count – Display favorite counts (true/false, default: true)
  • columns – Grid layout (1, 2, or 3 columns, default: 1)
  • show_excerpt – Show post excerpts (true/false, default: false)
  • excerpt_length – Excerpt character limit (default: 80)

Key Features:

User Favorites:

  • Shows login prompt for guests
  • Displays “no favorites” message when empty
  • Includes post thumbnails, titles, excerpts
  • Each item has a “View Details” link and favorite button
  • Responsive grid layout

Popular Places:

  • Ranks posts by favorite count (#1, #2, etc.)
  • Special gold styling for #1 most popular
  • Shows favorite counts with star icons
  • Includes same layout options as user favorites

Complete Styling:

  • Responsive design that works on mobile
  • Hover effects and smooth transitions
  • Card-based layout with thumbnails
  • Unique canvass- prefixed classes to avoid conflicts
  • Special highlighting for top-ranked items