Title: Code not working anymore
Last modified: December 6, 2017

---

# Code not working anymore

 *  Resolved [rangitoto](https://wordpress.org/support/users/rangitoto/)
 * (@rangitoto)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/code-not-working-anymore/)
 * Hi all!
 * My code which I inserted into single.php in my child-theme always worked fine!
   
   Now, suddenly it’s not working anymore…. Does somebody has an idea why and what
   I need to change? `<div style="margin:20px; margin-top:5px"><div class="widget"
   ><div align="center"><b><?php if (method_exists($advanced_post_list, "APL_display")){
   echo $advanced_post_list->APL_display("relatedpost-list-titel");} ?></b> <input
   type="button" value="&rarr; clic &larr;" style="width:150px;height:50px;font-
   size:25px;color:#4F4729;margin:0px;padding:0px;margin-top:-20px; " class="clicbutton"
   onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('
   div')[0].style.display != '') { this.parentNode.parentNode.getElementsByTagName('
   div')[1].getElementsByTagName('div')[0].style.display = ''; this.innerText = '';
   this.value = '&rarr; close &larr;'; } else { this.parentNode.parentNode.getElementsByTagName('
   div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText
   = ''; this.value = '&rarr;clic &larr;'; }" /></div><div class="quotecontent">
   <div style="display: none;"><?php if (method_exists($advanced_post_list, "APL_display")){
   echo $advanced_post_list->APL_display("relatedpost-list");} ?></div></div></div
   ></div>`
 * Thank you very much for help!
    rangi
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcode-not-working-anymore%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Support [Advanced Post List](https://wordpress.org/support/users/advancedpostlist/)
 * (@advancedpostlist)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/code-not-working-anymore/#post-9757682)
 * This may be a related issue to the rendering. For testing purposes…
 * 1. Go to, Edit Post List.
    2. Enable ‘Empty Message’. 3. Add any kind of message
   to display.
 * Then go to the page the Post List is suppose to render on, and if there is no
   message, then there it is a known bug. It’s believed to be indirectly related
   to a slug conflict, and it has been cited when `pre_posts` occurs.
 * You could try troubleshooting it by changing the slug, or you could try disabling
   some plugins to try and spot the problem (which would help us reproduce the error
   as well).
 *  Thread Starter [rangitoto](https://wordpress.org/support/users/rangitoto/)
 * (@rangitoto)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/code-not-working-anymore/#post-9758259)
 * Thanks for your fast answer.
    I did what you said, but sadly does not work and
   I can’t figure out which plugin could cause this… I keep trying ! 😉
 *  Plugin Support [Advanced Post List](https://wordpress.org/support/users/advancedpostlist/)
 * (@advancedpostlist)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/code-not-working-anymore/#post-9758439)
 * Then there is something wrong with the render process. You could try troubleshooting
   it by changing the slug.
 * I also created a post so people can comment on it, and contribute some information
   that may help create a resolve. Feel free to comment any plugin information on
   [Post Lists no longer displaying](https://support.advancedpostlist.com/2017/12/post-lists-no-longer-displaying/).
 *  Plugin Support [Advanced Post List](https://wordpress.org/support/users/advancedpostlist/)
 * (@advancedpostlist)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/code-not-working-anymore/#post-9788072)
 * I added a possible fix with Post Lists not Displaying when certain plugins are
   active, and/or using a slug that is identical to the post/page.
 * [0.4.2.a1 Fix Post Lists not displaying.](https://github.com/Advanced-Post-List/advanced-post-list/releases/tag/0.4.2.a1)
 * The problem was with the `parse_query` where some plugins modify queried data,
   and was either returning the wrong object, or nothing at all. Took awhile, but
   this might solve most of the display issue.
 * Please let me know if this fixes your issue.
 *  Thread Starter [rangitoto](https://wordpress.org/support/users/rangitoto/)
 * (@rangitoto)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/code-not-working-anymore/#post-9797721)
 * Hi, I updated to 0.4.2.1 but still no difference…
 *  Plugin Support [Advanced Post List](https://wordpress.org/support/users/advancedpostlist/)
 * (@advancedpostlist)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/code-not-working-anymore/#post-9798212)
 * Looks like the issue may have been spotted, and originally thought it was part
   of other similar issues. There already changes added, but was hoping you could
   confirm it. You can do one of two things, although the first of the two would
   probably best…
 * 1. Replace the line with `<?php if (method_exists($advanced_post_list, "display_post_list")){
   echo $advanced_post_list->display_post_list("relatedpost-list-titel");} ?>`.
 * 2. Or download and update to this [Hotfix](https://github.com/Advanced-Post-List/advanced-post-list/releases/tag/0.4.3.a1).
    -  This reply was modified 8 years, 5 months ago by [Advanced Post List](https://wordpress.org/support/users/advancedpostlist/).
 *  Thread Starter [rangitoto](https://wordpress.org/support/users/rangitoto/)
 * (@rangitoto)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/code-not-working-anymore/#post-9799010)
 * Wow! Solution number one helped !!!
    THANK YOU VERY MUCH !!!!
 * Advanced Post List is a great plugin! 5 stars from me!
 *  Plugin Support [Advanced Post List](https://wordpress.org/support/users/advancedpostlist/)
 * (@advancedpostlist)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/code-not-working-anymore/#post-9800240)
 * Awesome! That is great to hear, and thank you for verifying the fix as well.
 * Next update will contain the changes, and will work with both the old and new
   methods.

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

The topic ‘Code not working anymore’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/advanced-post-list.svg)
 * [Advanced Post List](https://wordpress.org/plugins/advanced-post-list/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/advanced-post-list/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-post-list/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-post-list/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-post-list/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-post-list/reviews/)

## Tags

 * [code](https://wordpress.org/support/topic-tag/code/)
 * [relatedpost](https://wordpress.org/support/topic-tag/relatedpost/)

 * 8 replies
 * 2 participants
 * Last reply from: [Advanced Post List](https://wordpress.org/support/users/advancedpostlist/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/code-not-working-anymore/#post-9800240)
 * Status: resolved