Title: Code in theme not working?
Last modified: August 22, 2016

---

# Code in theme not working?

 *  [nabjoern](https://wordpress.org/support/users/nabjoern/)
 * (@nabjoern)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/code-in-theme-not-working/)
 * Thank you for your effort. The plugin looks very good.
 * Unfortunately, the shortcode works only. When I insert the code (<?php do_action(‘
   gd_mylist_btn’); ?>) into the theme, unfortunately nothing is displayed. What
   am I doing wrong? Can I debug this anyhow?
 * Using the shortcode is not a solution in my case.
 * Hopefully someone can help me.
 * Cheers,
    Björn
 * [https://wordpress.org/plugins/gd-mylist/](https://wordpress.org/plugins/gd-mylist/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Thread Starter [nabjoern](https://wordpress.org/support/users/nabjoern/)
 * (@nabjoern)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/code-in-theme-not-working/#post-5709801)
 * Ok, I found a solution:
    I replaced the “return” in function “gd_show_mylist_btn”
   with “echo” or “print”. Now I can see the button in the page. Whether it is a
   bug or it does not work only for me, I’m not sure. Anyway, it has helped me.
 * Cheers,
    Björn
 *  Thread Starter [nabjoern](https://wordpress.org/support/users/nabjoern/)
 * (@nabjoern)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/code-in-theme-not-working/#post-5709842)
 * I have noticed a problem with the mentioned workaround. Unfortunately, the “remove-
   button” no longer works on the Wishlist-Site?
 *  Plugin Author [Andrea Greco](https://wordpress.org/support/users/andygi/)
 * (@andygi)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/code-in-theme-not-working/#post-5710013)
 * Hi Nabjoern
 * first of all thank you for have resolved the bug, I’ll add on new release 🙂
   
   regarding the remove button I’ll check and I’ll let you know.
 * cheers
 *  Thread Starter [nabjoern](https://wordpress.org/support/users/nabjoern/)
 * (@nabjoern)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/code-in-theme-not-working/#post-5710014)
 * Hi andygi,
 * no Problem. I have to thank you.
    Luckily I have also solved the other bug. But
   the solution is a bit dirty.
 * > function gd_show_mylist_btn($styletarget = null, $item_id = null, **$echo =
   > true )**
 * >  if($echo == true) {
   >  echo $html; } else { return $html; }
 * I think that you could code a nicer solution.
    Cheers, Björn
 *  Plugin Author [Andrea Greco](https://wordpress.org/support/users/andygi/)
 * (@andygi)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/code-in-theme-not-working/#post-5710017)
 * Hi Björn
 * thank you so much for your solution.
    I’ll provide a new one for next release,
   I hope in the end of February (busy time sorry). In meantime thank you again 
   for support me.
 * cheers
 * Andy

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Code in theme not working?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/gd-mylist_fbfbfc.svg)
 * [GDMylist](https://wordpress.org/plugins/gd-mylist/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gd-mylist/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gd-mylist/)
 * [Active Topics](https://wordpress.org/support/plugin/gd-mylist/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gd-mylist/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gd-mylist/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Andrea Greco](https://wordpress.org/support/users/andygi/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/code-in-theme-not-working/#post-5710017)
 * Status: not resolved