1. Home
  2. ReHub Theme
  3. How to …
  4. How To add favorites posts button

How To add favorites posts button

Rehub theme has inner wishlist functions, which you can use without any other plugins. Some post and product layouts have enabled wishlist by default. If you want to delete wishlist from them, you can do this from Theme option – Global enable/disable.

To use wishlist, first of all, you must create page for wishlist results. For this, create page and place there shortcode

[rh_get_user_favorites]

Shortcode will support favorites posts for logined users and for guests.

Also, you must exclude this page from cache if you use cache plugins.

If you use Post layout which doesn’t have enabled wishlist and you want to add such button, go to Theme option – ads option – single areas and add to one of area next shortcode

[RH_wishlist wishlistadd="Add to Wishlist" wishlistadded="Added to wishlist" wishlistremoved="Removed from wishlist"]

You can also disable wishlist for guests (when they click on wishlist, they will see login popup) in theme option – Allow to use wishlist only for logged users

How to add icon for favorite page in right part of menu

On some demo sites you can see favorite icon inside menu in right part. No need for any plugin for this. Do next steps. On menu page ( Appearance   Menus ), click on right top corner button (Screen options) and enable there CSS classes. Now, you can add additional CSS class to each menu. Create Menu item for page where you placed output shortcode for favorites posts. Add next CSS class – floatright. In menu title Add title with icon. Example:

<i class="fa fa-heart-o"></i> Wishlist