Featured Image

Favorites

<?php // This function will accept an optional User ID parameter $favorites = get_user_favorites(); if ($favorites): // Method 2: WP_Query Object $favorites_query = new WP_Query(array( 'post_type' => 'workout', 'posts_per_page' => 5, 'post__in' => $favorites )); if ( $favorites_query->have_posts() ) : while ( $favorites_query->have_posts() ) : $favorites_query->the_post(); get_template_part('templates/content-workout'); //get_template_part('parts/workout-playlist'); endwhile; endif; wp_reset_postdata(); else: echo 'Your playlist is empty'; endif; wp_reset_postdata(); ?>

Favorites for any post type. Easily add favoriting/liking, wishlists, or any other similar functionaliyt using the developer-friendly API.

The plugin can provide a way to save favorites, likes, bookmarks, or any other similar types of data with its customizable button text.

Visit favoriteposts.com for a full list of available template functions and shortcodes.

Features

Use with Any Post Type – Enable or disable favorite functionality per post type while automatically adding a favorite button before and/or after the content. Or, use the included functions to display the button anywhere in your template.

Available for All Users – Don’t want to hide functionality behind a login? Favorites includes an option to save anonymous users’ favorites by either Session or Cookie. Logged-In users’ favorites are also saved as user meta

Designed for Developers – Favorites works great out-of-the-box for beginners, but a full set of template functions unlocks just about any sort of custom functionality developers may need. Favorites outputs the minimum amount of markup needed, putting the style and control in your hands.

Multisite Compatible – As of version 1.1.0, Favorites is multisite compatible. User favorites are saved on a site/blog basis, and may be retrieved and displayed across sites.

For more information visit favoriteposts.com.

Edit Post and ACF Fields

1
2
1
1

File name:

File size: