{CODICTS} Snippets is now available

MyListing Preview Cards Addon

The {CODICTS} MyListing Preview Cards Addon is a comprehensive plugin that extends MyListing’s listing preview card system with new templates, interactive shortcodes, a video player, a likes/favorites system, video view tracking, and explore page filters for sorting by views and likes.

Installation & Activation

Start by downloading the plugin from the Downloads page on your dashboard on the CoDicts website.

After downloading, install and activate the plugin in WordPress by navigating to “Plugins” > “Add New” > “Upload Plugin” and selecting the downloaded zip file. Click “Install Now” and then “Activate”.

The plugin automatically copies its template files to the child theme on activation. The new preview card templates are immediately available in the MyListing Listing Type Editor → Preview Card → Template dropdown.

Important: A MyListing child theme is required. The plugin copies modified template files into the child theme directory. Without a child theme, the plugin displays an error notice and does not load.


Key Features

FeatureDescription
4 New Preview Card TemplatesProfile View, Video View, Mosaic View, and Social View — each with configurable options in the listing type editor.
Video Player (Video.js)Full-featured video player supporting YouTube, Vimeo, HTML5, Facebook, TikTok, Instagram, and Hudl videos.
Video Quick ViewPlay button on preview cards that opens videos in a lightbox popup without leaving the explore page.
Likes SystemPer-user like button with its own database table, analytics tracking, and time-ranged statistics.
Video View TrackingTracks video views with visitor metadata. Supports time-ranged statistics (today, week, month, year, all time).
Favorite CategoriesListing owners can mark categories as “favorites” so they appear first on preview cards.
10 ShortcodesWork hours, video player, share, likes, comments, reviews, video views, time elapsed, shorten text, and redirect link.
Explore FiltersVideo Views and Listing Likes filters for the explore page with time-range presets and sorting.
Multiple Categories DisplayConfigure how many categories to show per footer section on preview cards.

Preview Card Templates

The plugin adds four new preview card templates to the MyListing listing type editor. To use them, go to Listing Type Editor → Preview Card → Template and select one from the dropdown.

Profile View

Displays the listing’s logo as the main visual element instead of the cover image. Ideal for people profiles, team members, or any listing where the logo or avatar is the primary identifier.

OptionValuesDescription
MosaicYes / NoWhen enabled, crops the logo into a mosaic tile instead of showing it as a full background.

Video View

Embeds an inline video player directly within the preview card when the listing has a video_url field. The video plays right on the card without opening a separate page.

OptionValuesDescription
Switch Title and Info FieldsYes / NoSwaps the position of the listing title and info fields on the card.

Mosaic View

Shows the cover image or gallery as a cropped mosaic-style tile. Supports gallery carousel mode with navigation arrows when the listing has multiple images.

OptionValuesDescription
BackgroundImage / GalleryImage mode shows the cover image. Gallery mode shows a carousel of gallery images.
Header PositionTop / BottomPosition of the listing info relative to the image.
Switch Title and Info FieldsYes / NoSwaps the position of the title and info fields.

Social View

A smart, adaptive template that automatically selects the best layout based on the listing’s available content. It checks what content the listing has and picks the most appropriate display:

If the Listing Has…Template Used
A video URLVideo View
Gallery imagesConfigurable: Default / Alternate / Mosaic View / Profile View
A cover image (no gallery)Configurable: Default / Alternate / Mosaic View
Text only (no media)List View

Social View has the most configuration options, letting you choose which sub-template to use for each content scenario, along with header position and title switching options for the mosaic variants.


Shortcodes

The plugin provides 10 shortcodes that can be used inside MyListing’s preview card builder (using the bracket syntax) or anywhere on your site. In the preview card builder, use [[:id]] to automatically insert the current listing’s ID.

Work Hours

[codicts-work-hours id=[[:id]]]

Displays today’s open/close schedule from the listing’s work hours field (e.g., “9:00 AM – 5:00 PM”). Returns nothing if no work hours are set.

Video Player

[codicts-video url=[[video_url]] id=[[:id]] autoplay=false share=true]

Renders a full-featured Video.js video player. Supports multiple platforms:

PlatformHow It Plays
YouTubeInline Video.js player (supports short URLs)
VimeoInline Video.js player
HTML5 (MP4, etc.)Native Video.js player
FacebookOpens in popup (can be forced inline via filter)
TikTokOpens in popup
InstagramOpens in popup
HudlOpens in popup
AttributeDefaultDescription
urlRequiredThe video URL.
idCurrent postListing ID (used for view tracking).
autoplayfalseWhether to autoplay the video.
sharetrueShow a share button in the player.
in_linefalseFor TikTok/Instagram/Facebook: force inline playback instead of popup.

Share Button

[codicts-share id=[[:id]]]

Renders a share button that opens a social share modal with links for Facebook, Twitter, and other platforms using MyListing’s native share system.

Likes Button

[codicts-likes id=[[:id]]]

Adds a clickable heart/like button with a count. Toggles between liked and unliked states. Requires user login. The count updates dynamically when clicked.

Comments Count

[codicts-comments id=[[:id]] tab="comments"]

Displays the comment count with a link to the comments tab on the listing page. Shows singular “Comment” or plural “Comments” based on the count.

AttributeDefaultDescription
tabemptyThe tab anchor to link to on the listing page (e.g., comments).

Reviews Count

[codicts-reviews id=[[:id]] tab="reviews"]

Same as the comments shortcode but labeled “Reviews.” Links to the reviews tab on the listing page.

Video Views

[codicts-video-views id=[[:id]] time="all"]

Displays the video view count for a listing.

AttributeDefaultDescription
timeallTime range: all, today, this-week, this-month, this-year.

Time Elapsed

[codicts-time-elapsed id=[[:id]] full_string="false"]

Displays a human-readable relative time since the listing was published (e.g., “2h ago”, “3 days ago”).

AttributeDefaultDescription
full_stringfalseWhen true, shows the full format (e.g., “2 hours, 30 minutes ago”).

Shorten Text

[codicts-short-text text="[[description]]" url="[[:url]]" limit="300" button_text="Find out more" limit_by="characters"]

Truncates text content with an optional “Read more” link. HTML tags are stripped before truncating.

AttributeDefaultDescription
textemptyThe text content to truncate.
urlemptyURL for the “read more” link. No button shown if empty.
limit20Maximum characters or words to show.
limit_bycharactersTruncation mode: characters or words.
button_textFind out moreText for the read-more link.

Redirect Link

[codicts-redirect-link url="[[custom-url-field]]" target="_blank"]

Overrides the preview card’s default click action to redirect to a custom URL instead of the listing page. Useful for affiliate links or external listings.

AttributeDefaultDescription
urlRequiredThe URL to redirect to when the card is clicked.
targetemptySet to _blank to open in a new tab.

Video Quick View

The Video Quick View feature adds a play button to listing preview cards. When clicked, the video opens in a lightbox popup directly on the explore page — the user doesn’t need to visit the listing page to watch the video.

To enable this:

1. Go to the Listing Type Editor.

2. In the Preview Card section, look for the Video Quick View checkboxes on each footer section.

3. Check the box for the footer section where you want the play button to appear.

4. Save the listing type.


Likes System

The plugin provides a dedicated likes system separate from MyListing’s native bookmarks. Likes are stored in their own database table with full analytics tracking — who liked, when, from where, and on what device.

How It Works

1. Add the [codicts-likes id=[[:id]]] shortcode to your preview card in the listing type editor.

2. A heart/like button appears on each listing card.

3. When a logged-in user clicks the button, their like is recorded. Clicking again removes the like (toggle behavior).

4. The like count updates dynamically on click.

Likes vs. Bookmarks

Likes (This Plugin)Bookmarks (MyListing Native)
StorageDedicated database tableUser meta array
AnalyticsFull visitor metadata (device, browser, country, etc.)No analytics
Time-ranged statsToday, week, month, year, all timeNo time filtering
Explore filter/sortYes — sort by most likedNo

Legacy Mode: If you prefer to use MyListing’s native bookmarks as the likes system, add this to your child theme’s functions.php:
add_filter( 'codicts-mylisting-preview-cards-addon::use-legacy-likes', '__return_true' );


Video View Tracking

The plugin tracks video views in a dedicated database table. When a video is played for a configurable number of seconds (default: 5 seconds), a view is recorded with visitor metadata.

View Count Display

Add the [codicts-video-views id=[[:id]] time="all"] shortcode to your preview card to display view counts. Use the time attribute to show counts for specific periods: all, today, this-week, this-month, this-year.

Changing When a View Is Counted

By default, a video must be watched for 5 seconds before a view is counted. To change this, add to your child theme’s functions.php:

add_filter( 'codicts-mylisting-preview-cards-addon::before-view-seconds', function( $seconds ) {
    return 10; // Change to your preferred number of seconds
}, 10, 1 );

Favorite Categories

Listing owners can mark specific categories as “favorites” for their listing. Favorited categories appear first in the category list on the preview card footer, making the most important categories more visible.

Favorites are set per-listing through the admin interface when editing a listing. The plugin adds a favoriting control to category selections in the listing editor.

Category Count Per Footer Section

You can configure how many categories to display per footer section on preview cards. This is set in the Listing Type Editor where the plugin adds a category count field to each footer section’s settings.


Explore Page Filters

The plugin adds two custom filters to MyListing’s explore page, letting visitors filter and sort listings by video views and likes.

Setting Up the Video Views Filter

1. Go to the Listing Type Editor → Search Forms.

2. Add the “{C} Video Views” filter.

3. Configure which time-range presets to offer (All time, Today, This week, This month, This year).

4. To sort by most viewed: In Listing Order, set the key field to most-viewed, Order By to option, Select option to none, and check “Ignore listing priority”.

Setting Up the Listing Likes Filter

1. Go to the Listing Type Editor → Search Forms.

2. Add the “{C} Listing Likes” filter.

3. Configure the time-range presets.

4. To sort by most liked: In Listing Order, set the key field to most-likes, Order By to option, Select option to none, and check “Ignore listing priority”.


Facebook Video Playback

Facebook videos open in a popup by default due to Facebook’s API limitations. If you want Facebook videos to play inline on preview cards instead, add this to your child theme’s functions.php:

add_filter( 'codicts-mylisting-preview-cards-addon::facebook-inline', '__return_true' );

For Facebook videos, the plugin uses the listing’s cover image as the video thumbnail since Facebook doesn’t provide thumbnail access through its standard embed.


Showing Filtered View Counts on Preview Cards

By default, the [codicts-video-views] shortcode shows all-time view counts. If you want preview cards to show the view count matching the current explore page filter selection instead, add this to your child theme’s functions.php:

add_filter( 'codicts-mylisting-preview-cards-addon::display-filtered-views', '__return_true' );

Template File Management

The plugin copies modified template files into your child theme to override specific MyListing templates. These overrides enable the new preview card templates, favorite categories, multiple categories display, and video quick view features.

What Gets Overridden

TemplatePurpose
Preview card templatesProfile View, Video View, Mosaic View, and Social View card layouts
Footer sectionsAdds favorite categories, multi-category display, and video quick view button
Preview card editorAdds new template options to the listing type editor dropdown
Explore filter templatesAdmin and frontend templates for Video Views and Listing Likes filters

On Deactivation

All copied template files are removed from the child theme. Your MyListing templates revert to their defaults.

On Plugin Update

Template files are refreshed with the latest version. If you’ve customized any of the plugin’s template files in the child theme, your changes will be overwritten. Consider using hooks and filters for customizations instead of direct template edits.

Tip: If templates appear outdated or broken after a MyListing theme update, deactivate and reactivate this plugin to refresh the template files.


Frequently Asked Questions

Why is a child theme required?

The plugin copies modified template files into the child theme directory so they override MyListing’s default templates. Without a child theme, the plugin has nowhere to place these files safely.

Does the plugin modify MyListing’s core files?

No. It places modified copies into the child theme, where MyListing’s template system finds them first. The original MyListing templates in the parent theme remain untouched.

Will updating MyListing break the plugin?

The plugin overrides specific templates. If MyListing significantly changes those templates in an update, there may be visual issues. Deactivate and reactivate the plugin after major MyListing updates to refresh the template files.

Can I customize the preview card templates?

Yes. After the plugin copies them to your child theme, you can edit the files directly. However, deactivating and reactivating the plugin will overwrite your changes. To preserve customizations, make modifications after activation and avoid reactivating unnecessarily.

How does view counting work?

When a Video.js player plays a video for the configured duration (default 5 seconds), the view is recorded in a dedicated database table with visitor metadata. Views are cached for fast retrieval and sorting.

How does the likes system differ from bookmarks?

The likes system uses a dedicated database table with full analytics tracking (who liked, when, from where, what device). It supports time-ranged statistics and can be filtered and sorted on the explore page. Bookmarks are a simple user meta entry with no analytics.

Can I sort listings by most viewed or most liked?

Yes. Add the Video Views or Listing Likes filter to the listing type’s search form, then set the Listing Order key field to most-viewed or most-likes respectively.

Which video platforms are supported?

YouTube (including short URLs), Vimeo, HTML5 (MP4, etc.), Facebook, TikTok, Instagram, and Hudl. YouTube, Vimeo, and HTML5 play inline via Video.js. TikTok, Instagram, Hudl, and Facebook open in a popup by default.

Can I use these shortcodes outside of preview cards?

Yes. All shortcodes work anywhere on your site — in pages, posts, widgets, or Elementor templates. Just provide the listing ID manually instead of using [[:id]].


Troubleshooting

Plugin Not Loading / Admin Error Notice

CauseSolution
“MyListing Theme Not Detected”Install and activate the MyListing theme.
“MyListing Child Theme Not Detected”Create and activate a MyListing child theme.
Templates not appearing in dropdownDeactivate and reactivate the plugin to force-reinstall template files.

Video Player Not Working

CauseSolution
“No Video Url” displayedThe url attribute is missing or empty in the shortcode. Ensure the listing has a video URL field with a value.
YouTube/Vimeo not playingCheck the browser console for errors. Ensure the video URL is valid and publicly accessible.
Facebook videos not playing inlineFacebook limits inline playback. Add add_filter( 'codicts-mylisting-preview-cards-addon::facebook-inline', '__return_true' ); to force inline mode.
TikTok/Instagram showing popupThese platforms don’t support inline playback. Popup behavior is by design.

Likes Not Working

CauseSolution
Button not respondingEnsure the user is logged in (required for the likes system). Check the browser console for errors.
Counts reset after switching systemsIf you switched from legacy bookmarks to the new likes system, existing bookmark data is not migrated. This is expected.

Video Views Not Counting

CauseSolution
Views not incrementingThe video must be watched for the configured number of seconds (default: 5) before a view is counted.
View counts showing 0The view cache may be stale. Delete the _codicts_views_cache post meta to force a refresh, or wait for the cache to update on the next view.
Sorting by most-viewed not workingEnsure the listing order key field is set to exactly most-viewed in the listing type editor.

Favorite Categories Not Reordering

CauseSolution
Categories not showing favorites firstFavorites are per-listing. Ensure you’ve marked categories as favorites for the specific listing.
Category count not matchingThe category count per section is configured in the listing type editor. Check the footer section settings.

Preview Card Templates Look Broken

CauseSolution
Outdated template filesDeactivate and reactivate the plugin to refresh template files in the child theme.
MyListing was updatedMajor MyListing updates may change template structures. Deactivate and reactivate the plugin after updating MyListing.
Manual edits conflictingIf you’ve customized template files in the child theme, check that your edits are compatible with the current plugin version.

“MyListing Theme Not Detected” Error

The MyListing theme must be installed and active with a child theme. Go to Appearance → Themes to verify both the parent theme and child theme are properly configured.


For further support, visit codicts.com or contact us at support@codicts.com.

CoDicts Co., Ltd. © 2021-2026. All rights reserved