Click here to Skip to main content
15,889,116 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I use the Divi Blog module (loop), but it lacks some functions. So with a childtheme and code I retrieve post meta in the Divi Blog Module, thats all working fine. But, I also want a working wishlist icon in the loop per post.

I use the plugin Divi Machine for multiple things, like a memberarea. They also have a module Wishlist (add_wishlist). I use this module on single post, where it works great. But I also want to use this module in the Divi Blog Module.

I used inspector to find the code that is used for the add to wishlist heart in a single post and it's like this, but how can I use this to als make it work as php code for the divi blog module.

HTML
<a href="#" class="add_wishlist  " data-post_id="5921" data-saved_or_dislike="saved" data-post_type="activiteit" data-saved_type_single="wishlist" data-saved_type="wishlist" data-adding_text="Adding to your list" data-success_text="Added to your list" data-remove_adding_text="Removing from your list" data-remove_success_text="Removed from your list" data-account_url="https://www.hulpbijhb.nl/account" data-timer_delay="1500" data-use_popup="off" data-relation="none" data-loggedin="yes">
  </a>


What I have tried:

So far I got this.

I used this code

$add_wishlist = add_action($post->ID, 'add_wishlist', true) ? add_action($post->ID, 'add_wishlist', true) : "";
if($add_wishlist != "") { 
echo '<div class="add_wishlist">'. $add_wishlist . '</div>'; 
}


1. There is a heart and it's clickable and it changes when you click it, but it doesn't save the post in the wishlist page. How can I make this work?

2. A number 1 appears before the heart, why is that? And how can I remove that?

3. I would like to place the heart on top of the image in the right corner above of that post? I can move the heart to the image container, but then it appears above the image. What is the best way to make it possible?



I hope somebody can help me with this.

Thank you very much!
Posted
Updated 23-Jul-23 1:16am
v3

1 solution

Would you not be better off acking for support in the official Community Forums? Here is the link: ElegantThemes Forum • Index page[^]
 
Share this answer
 
Comments
Joyce Blok 23-Jul-23 8:41am    
Thank you, I will also ask it there.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900