Title: cdsanchez's Replies | WordPress.org

---

# cdsanchez

  [  ](https://wordpress.org/support/users/cdsanchez/)

 *   [Profile](https://wordpress.org/support/users/cdsanchez/)
 *   [Topics Started](https://wordpress.org/support/users/cdsanchez/topics/)
 *   [Replies Created](https://wordpress.org/support/users/cdsanchez/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/cdsanchez/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/cdsanchez/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/cdsanchez/engagements/)
 *   [Favorites](https://wordpress.org/support/users/cdsanchez/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [[Plugin: Lightbox Gallery] Display scripts only when gallery is used](https://wordpress.org/support/topic/plugin-lightbox-gallery-display-scripts-only-when-gallery-is-used/)
 *  Thread Starter [cdsanchez](https://wordpress.org/support/users/cdsanchez/)
 * (@cdsanchez)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/plugin-lightbox-gallery-display-scripts-only-when-gallery-is-used/#post-850930)
 * I tried editing your plugin to see if I could do it myself, but I couldn’t figure
   it out. When you do decide to implement this, take this in mind: only display
   the scripts when a gallery is **used**, not when an image is attached to the 
   post.
 * I tried:
 *     ```
       if (do_shortcode('[gallery]')) {
       //display scripts
       }
       ```
   
 * and
 *     ```
       if (gallery_shortcode($post->ID)) {
       //display scripts
       }
       ```
   
 * But those two will display the scripts if the post has an image attached, regardless
   of whether an actual gallery was inserted. Someone suggested iterating through
   an array created by the shortcode_parse_atts() function and searching for the[
   gallery] short code, but I haven’t tried it out:
 * `$array = shortcode_parse_atts($post->post_content);`
 * Other than that, it’s a pretty good plugin and does what it says. The only thing
   I think would be nice, in addition to the scripts feature I mentioned above, 
   is an option page to change the default size on the images so we don’t have to
   change the size in the gallery shortcode every time.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Set Category Base to NULL](https://wordpress.org/support/topic/set-category-base-to-null/)
 *  Thread Starter [cdsanchez](https://wordpress.org/support/users/cdsanchez/)
 * (@cdsanchez)
 * [18 years ago](https://wordpress.org/support/topic/set-category-base-to-null/#post-834028)
 * I asked on another forum and they pointed me to: [http://wordpress.org/extend/plugins/advanced-permalinks/](http://wordpress.org/extend/plugins/advanced-permalinks/)
 * Does the job perfectly
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [[Plugin: Yet Another Related Posts Plugin] Remove YARPP from End of Post](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-remove-yarpp-from-end-of-post/)
 *  Thread Starter [cdsanchez](https://wordpress.org/support/users/cdsanchez/)
 * (@cdsanchez)
 * [18 years ago](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-remove-yarpp-from-end-of-post/#post-812747)
 * I tried that, but it disables the sidebar widget as well
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Plugin: Yet Another Related Posts Plugin] Upgraded to 2,0 – now not working](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-upgraded-to-20-now-not-working/)
 *  [cdsanchez](https://wordpress.org/support/users/cdsanchez/)
 * (@cdsanchez)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-upgraded-to-20-now-not-working/page/2/#post-807556)
 * The dev version worked for me perfectly. Thanks 🙂
 * EDIT: Actually, I noticed that it always returns the same related posts. I don’t
   have a tremendous amount of posts on it but it should still vary. The relevance
   scores for all stories are always exactly the same when viewing as admin.
 * Using WP-Supercache if that matters at all.
 * [http://addonsfirefox.com](http://addonsfirefox.com) if you want to look for 
   yourself.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Plugin: Yet Another Related Posts Plugin] Upgraded to 2,0 – now not working](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-upgraded-to-20-now-not-working/)
 *  [cdsanchez](https://wordpress.org/support/users/cdsanchez/)
 * (@cdsanchez)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-upgraded-to-20-now-not-working/page/2/#post-807513)
 * Upgraded to 2.0.3 and I still get no results
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Plugin: Yet Another Related Posts Plugin] Upgraded to 2,0 – now not working](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-upgraded-to-20-now-not-working/)
 *  [cdsanchez](https://wordpress.org/support/users/cdsanchez/)
 * (@cdsanchez)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-upgraded-to-20-now-not-working/#post-807467)
 * Upgraded to 2.0.1 and I also get the T_DNUMBER error as well.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Plugin: Yet Another Related Posts Plugin] Upgraded to 2,0 – now not working](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-upgraded-to-20-now-not-working/)
 *  [cdsanchez](https://wordpress.org/support/users/cdsanchez/)
 * (@cdsanchez)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-upgraded-to-20-now-not-working/#post-807427)
 * I installed the 2.0 version first and it doesn’t display any. When I installed
   the plugin I got these errors:
    Warning: array_keys() [function.array-keys]: 
   The first argument should be an array in /home/addonsfi/public_html/wp-content/
   plugins/yet-another-related-posts-plugin/includes.php on line 63
 * Warning: Invalid argument supplied for foreach() in /home/addonsfi/public_html/
   wp-content/plugins/yet-another-related-posts-plugin/includes.php on line 63
 * Warning: array_keys() [function.array-keys]: The first argument should be an 
   array in /home/addonsfi/public_html/wp-content/plugins/yet-another-related-posts-
   plugin/includes.php on line 67
 * Warning: Invalid argument supplied for foreach() in /home/addonsfi/public_html/
   wp-content/plugins/yet-another-related-posts-plugin/includes.php on line 67
 * Hopefully it should help in tracking down the problem
 * Using PHP5 in safemode

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