1

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 from Divi Engine (not from Divi Elegant Themes self) 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 also make it work as php code for the divi blog module.

HTML

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!

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.