Title: Latest version broke code
Last modified: November 21, 2023

---

# Latest version broke code

 *  [sninad](https://wordpress.org/support/users/sninad/)
 * (@sninad)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/latest-version-broke-code/)
 * I have a snippet that loads at table of amazon links based on a titleid. In a
   previous version, the following code worked well:
 *     ```wp-block-code
       <a href="http://[wbcr_php_snippet id='17166' titleid='8081698']" target="_blank" rel="noopener">Paper:</a>
       ```
   
 * This applies to the old code at [https://mountainsangha.org/products-on-sale](https://mountainsangha.org/products-on-sale).
   The links to the paper version on amazon are blank (“[https://&#8221](https://&#8221);).
   This code uses the following snippet, the one referred to above:
 *     ```wp-block-code
       global $alinks;
       echo $alinks[$titleid];
       ```
   
 * and used to work fine. Now I have to use a new snippet which goes against my 
   sense of “good coding ethics”:
 *     ```wp-block-code
       global $alinks, $alink; $titleid;
       $alink = $alinks[$titleid];
       echo "<a href='https://" . $alink . "' target='_blank'>";
       ```
   
 * Is there something I’m missing? Why doesn’t the first code work?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Flatest-version-broke-code%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

The topic ‘Latest version broke code’ is closed to new replies.

 * ![](https://ps.w.org/insert-php/assets/icon-256x256.gif?rev=3523853)
 * [Woody Code Snippets – Insert PHP, CSS, JS, and Header/Footer Scripts](https://wordpress.org/plugins/insert-php/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/insert-php/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/insert-php/)
 * [Active Topics](https://wordpress.org/support/plugin/insert-php/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/insert-php/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/insert-php/reviews/)

## Tags

 * [links](https://wordpress.org/support/topic-tag/links/)
 * [url](https://wordpress.org/support/topic-tag/url/)

 * 0 replies
 * 1 participant
 * Last reply from: [sninad](https://wordpress.org/support/users/sninad/)
 * Last activity: [2 years, 6 months ago](https://wordpress.org/support/topic/latest-version-broke-code/)
 * Status: not resolved