<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Snipplr</title>
    <description>Recent snippets posted on Snipplr.com</description>
    <link>https://snipplr.com/</link>
    <lastBuildDate>Wed, 10 Jun 2026 03:37:57 +0000</lastBuildDate>
    <item>
      <title>(PHP) Force Geo Mashup to use a different home URL (add a slash) - cyberhobo</title>
      <link>https://snipplr.com/view/67846/force-geo-mashup-to-use-a-different-home-url-add-a-slash</link>
      <description>&lt;p&gt;Some hosting configurations do uncontrollable redirects and other oddities that play havoc with Geo Mashup maps. Most commonly the home URL redirects improperly unless a slash is added at the end. This code attempts to add the slash just for Geo Mashup. Put it in a theme functions.php or in mu-plugins.&lt;/p&gt;</description>
      <pubDate>Sun, 21 Oct 2012 02:45:24 UTC</pubDate>
      <guid>https://snipplr.com/view/67846/force-geo-mashup-to-use-a-different-home-url-add-a-slash</guid>
    </item>
    <item>
      <title>(JavaScript) WordPress Geo Mashup Mapstraction Custom Markers - cyberhobo</title>
      <link>https://snipplr.com/view/64680/wordpress-geo-mashup-mapstraction-custom-markers</link>
      <description>&lt;p&gt;Some common custom javascript for customizing geo mashup map markers for any map provider. The marker images used are 24 x 24 pixels, anchored at the bottom center, with no shadow. You'd put images in `wp_content/plugins/geo-mashup-custom/images` to use your own images with this snippet. The example images are the old small markers and are still in the distributed plugin, you can use them by replacing `custom_url_path` with just `url_path`.&lt;/p&gt;</description>
      <pubDate>Fri, 20 Apr 2012 10:23:34 UTC</pubDate>
      <guid>https://snipplr.com/view/64680/wordpress-geo-mashup-mapstraction-custom-markers</guid>
    </item>
    <item>
      <title>(PHP) Load a javascript library (MarkerWithLabel) in a Geo Mashup map frame template - cyberhobo</title>
      <link>https://snipplr.com/view/64303/load-a-javascript-library-markerwithlabel-in-a-geo-mashup-map-frame-template</link>
      <description>&lt;p&gt;This is very close to the default map frame template that comes with Geo Mashup, but it registers and queues the external library.&lt;/p&gt;</description>
      <pubDate>Tue, 03 Apr 2012 05:03:36 UTC</pubDate>
      <guid>https://snipplr.com/view/64303/load-a-javascript-library-markerwithlabel-in-a-geo-mashup-map-frame-template</guid>
    </item>
    <item>
      <title>(JavaScript) Load KML attachments for all geo mashup map markers - cyberhobo</title>
      <link>https://snipplr.com/view/64271/load-kml-attachments-for-all-geo-mashup-map-markers</link>
      <description>&lt;p&gt;By default KML is only loaded for a selected marker. This bit of  [custom javascript](http://code.google.com/p/wordpress-geo-mashup/wiki/Documentation#Custom_JavaScript) will load it for all markers.&lt;/p&gt;</description>
      <pubDate>Sun, 01 Apr 2012 10:43:07 UTC</pubDate>
      <guid>https://snipplr.com/view/64271/load-kml-attachments-for-all-geo-mashup-map-markers</guid>
    </item>
    <item>
      <title>(HTML) Fix for Addthis menu appearing at page top - cyberhobo</title>
      <link>https://snipplr.com/view/51091/fix-for-addthis-menu-appearing-at-page-top</link>
      <description>&lt;p&gt;If you use hidden text spans inside link buttons instead of an image tag, addthis menus seem to attach to the page top instead of the link. For some reason a strong tag used the same way works.&lt;/p&gt;</description>
      <pubDate>Fri, 25 Mar 2011 04:51:30 UTC</pubDate>
      <guid>https://snipplr.com/view/51091/fix-for-addthis-menu-appearing-at-page-top</guid>
    </item>
    <item>
      <title>(PHP) Geo Mashup global map of the current category - cyberhobo</title>
      <link>https://snipplr.com/view/44389/geo-mashup-global-map-of-the-current-category</link>
      <description>&lt;p&gt;This code would go in a category template, outside the loop. In a more general template, you'd want to put it inside a check for `is_category()`.&lt;/p&gt;</description>
      <pubDate>Fri, 19 Nov 2010 03:22:59 UTC</pubDate>
      <guid>https://snipplr.com/view/44389/geo-mashup-global-map-of-the-current-category</guid>
    </item>
    <item>
      <title>(PHP) Geo Mashup post query contextual map - cyberhobo</title>
      <link>https://snipplr.com/view/37962/geo-mashup-post-query-contextual-map</link>
      <description>&lt;p&gt;Geo Mashup contextual maps display the results of a WordPress query, so they can be very useful in combination with the WordPress `query_posts` function. This example maps post with an example tag, but any call to `query_posts` could be substituted. This is code that would go in a WordPress template.&lt;/p&gt;</description>
      <pubDate>Wed, 28 Jul 2010 02:51:41 UTC</pubDate>
      <guid>https://snipplr.com/view/37962/geo-mashup-post-query-contextual-map</guid>
    </item>
    <item>
      <title>(PHP) Conditional Geo Mashup map template code - cyberhobo</title>
      <link>https://snipplr.com/view/29558/conditional-geo-mashup-map-template-code</link>
      <description>&lt;p&gt;This template code will work only in the WordPress Loop to include a map if the Geo Mashup plugin is active and the current post has a location.&lt;/p&gt;</description>
      <pubDate>Wed, 10 Mar 2010 15:26:24 UTC</pubDate>
      <guid>https://snipplr.com/view/29558/conditional-geo-mashup-map-template-code</guid>
    </item>
    <item>
      <title>(PHP) Global Geo Mashup map centered on current post - cyberhobo</title>
      <link>https://snipplr.com/view/28178/global-geo-mashup-map-centered-on-current-post</link>
      <description>&lt;p&gt;Use this code in a WordPress template with the Geo Mashup plugin (see URL) to include a global map within a post or page, centered on that post or page's location, with marker highlighted.&lt;/p&gt;</description>
      <pubDate>Thu, 11 Feb 2010 11:53:59 UTC</pubDate>
      <guid>https://snipplr.com/view/28178/global-geo-mashup-map-centered-on-current-post</guid>
    </item>
    <item>
      <title>(jQuery) Toggle next element on click - cyberhobo</title>
      <link>https://snipplr.com/view/23071/toggle-next-element-on-click</link>
      <description>&lt;p&gt;Make elements with the "toggle-next" class show/hide the following element when clicked.&lt;/p&gt;</description>
      <pubDate>Fri, 13 Nov 2009 12:47:04 UTC</pubDate>
      <guid>https://snipplr.com/view/23071/toggle-next-element-on-click</guid>
    </item>
    <item>
      <title>(PHP) WordPress is_child_of: Is this a child of page x? - cyberhobo</title>
      <link>https://snipplr.com/view/20847/wordpress-ischildof-is-this-a-child-of-page-x</link>
      <description>&lt;p&gt;This makes template code that applies to children of a particular page much more readable, especially if you can use a page path instead of an ID: `if ( is_child_of( 'topic/subtopic' ) ) :`.&lt;/p&gt;</description>
      <pubDate>Thu, 08 Oct 2009 15:25:09 UTC</pubDate>
      <guid>https://snipplr.com/view/20847/wordpress-ischildof-is-this-a-child-of-page-x</guid>
    </item>
    <item>
      <title>(JavaScript) Disable and enable a text input in Firefox - cyberhobo</title>
      <link>https://snipplr.com/view/19181/disable-and-enable-a-text-input-in-firefox</link>
      <description>&lt;p&gt;I just noticed in Firefox 3.5.2 that setting `disabled = true` for a focused text input seems to make it impossible to re-focus after setting `disabled = false`. The solution is to blur it before disabling.&lt;/p&gt;</description>
      <pubDate>Wed, 02 Sep 2009 12:49:15 UTC</pubDate>
      <guid>https://snipplr.com/view/19181/disable-and-enable-a-text-input-in-firefox</guid>
    </item>
    <item>
      <title>(jQuery) Encode HTML entities - cyberhobo</title>
      <link>https://snipplr.com/view/18967/encode-html-entities</link>
      <description>&lt;p&gt;Found at the source link - stealing and indexing :)&lt;/p&gt;</description>
      <pubDate>Fri, 28 Aug 2009 14:46:57 UTC</pubDate>
      <guid>https://snipplr.com/view/18967/encode-html-entities</guid>
    </item>
    <item>
      <title>(jQuery) Get the selected value from a select box - cyberhobo</title>
      <link>https://snipplr.com/view/18961/get-the-selected-value-from-a-select-box</link>
      <description>&lt;p&gt;It's not obvious from the jQuery documentation that `val()` will work to get the currently selected value of a select box (in 1.3.2 at least).&lt;/p&gt;</description>
      <pubDate>Fri, 28 Aug 2009 08:44:14 UTC</pubDate>
      <guid>https://snipplr.com/view/18961/get-the-selected-value-from-a-select-box</guid>
    </item>
    <item>
      <title>(PHP) WordPress: in subcatory? - cyberhobo</title>
      <link>https://snipplr.com/view/18874/wordpress-in-subcatory</link>
      <description>&lt;p&gt;Usually use in a template with `in_category()`, like `if ( in_category( 3 ) || in_subcategory( 3 ) ) { ...`. Tested in WP 2.8.4.&lt;/p&gt;</description>
      <pubDate>Wed, 26 Aug 2009 15:15:48 UTC</pubDate>
      <guid>https://snipplr.com/view/18874/wordpress-in-subcatory</guid>
    </item>
    <item>
      <title>(jQuery) Simple tabs with jQuery Core (not jQuery UI) - cyberhobo</title>
      <link>https://snipplr.com/view/18559/simple-tabs-with-jquery-core-not-jquery-ui</link>
      <description>&lt;p&gt;Sometimes I want simple tabs without all the packaging of jQuery UI with a theme. This does the job with just jQuery 1.2.6, and should work with later versions.&lt;/p&gt;</description>
      <pubDate>Wed, 19 Aug 2009 13:02:49 UTC</pubDate>
      <guid>https://snipplr.com/view/18559/simple-tabs-with-jquery-core-not-jquery-ui</guid>
    </item>
    <item>
      <title>(PHP) WordPress: Get the root page ID - cyberhobo</title>
      <link>https://snipplr.com/view/18408/wordpress-get-the-root-page-id</link>
      <description>&lt;p&gt;Get the ID of the root (oldest ancestor, parent without parents) page relative to the current page in a WordPress page template.&#13;
&#13;
Can be helpful for use with wp\_list\_pages() to create navigation markup.&lt;/p&gt;</description>
      <pubDate>Mon, 17 Aug 2009 17:49:20 UTC</pubDate>
      <guid>https://snipplr.com/view/18408/wordpress-get-the-root-page-id</guid>
    </item>
    <item>
      <title>(jQuery) jQuery: select first and/or last list items - cyberhobo</title>
      <link>https://snipplr.com/view/18407/jquery-select-first-andor-last-list-items</link>
      <description>&lt;p&gt;Select the first and last item in an unordered list. As an example, I add a CSS class to each.&#13;
&#13;
In WordPress, it's not so easy to get wp\_list\_pages() to generate these classes. jQuery provides an easy out for javascript-enabled clients.&lt;/p&gt;</description>
      <pubDate>Mon, 17 Aug 2009 17:14:01 UTC</pubDate>
      <guid>https://snipplr.com/view/18407/jquery-select-first-andor-last-list-items</guid>
    </item>
    <item>
      <title>(PHP) Wordpress: Does a page have children? - cyberhobo</title>
      <link>https://snipplr.com/view/18393/wordpress-does-a-page-have-children</link>
      <description>&lt;p&gt;There's no has\_children() function in WP 2.8.4, but get\_children() returns false if the post/page has no children, so it can serve the same purpose in a page template. &#13;
&#13;
Outside a page template you'd have to add a global declaration for the $post variable.&lt;/p&gt;</description>
      <pubDate>Mon, 17 Aug 2009 11:20:03 UTC</pubDate>
      <guid>https://snipplr.com/view/18393/wordpress-does-a-page-have-children</guid>
    </item>
  </channel>
</rss>
