Title: amp343's Replies | WordPress.org

---

# amp343

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

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

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 30 total)

1 [2](https://wordpress.org/support/users/amp343/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/amp343/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [Can custom post type permalinks use the same structure as normal posts?](https://wordpress.org/support/topic/can-custom-post-type-permalinks-use-the-same-structure-as-normal-posts/)
 *  Thread Starter [amp343](https://wordpress.org/support/users/amp343/)
 * (@amp343)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/can-custom-post-type-permalinks-use-the-same-structure-as-normal-posts/#post-2650184)
 * Trying to think a little more about why the default permalink structure (again,
   say /%year%/%monthnum%/%postname%/ for this case) would 404 when used with a 
   custom post type.
 * Upon more digging, it looks like a particular permalink structure only works 
   for the _first_ post type that it is registered to, custom or not. For example,
   I can also not use the same permalink structure for two custom post types (it
   only works for the first).
 * I guess this makes sense if WP uses the permalink structure to determine information
   about the page content (which post type, etc). But why should that matter if 
   every entry has a unique slug, no matter which post type it is?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom Post Type UI] [Plugin: Custom Post Type UI] Post Thumbnail problem](https://wordpress.org/support/topic/plugin-custom-post-type-ui-post-thumbnail-problem/)
 *  [amp343](https://wordpress.org/support/users/amp343/)
 * (@amp343)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-custom-post-type-ui-post-thumbnail-problem/#post-1662216)
 * Just want to second that – adding post thumbnail support to my theme’s functions.
   php file did the trick.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[AMP Sidebar Chooser] [Plugin: AMP Sidebar Chooser] Appears that it doesn't work with custom page templates](https://wordpress.org/support/topic/plugin-amp-sidebar-chooser-appears-that-it-doesnt-work-with-custom-page-templates/)
 *  Plugin Author [amp343](https://wordpress.org/support/users/amp343/)
 * (@amp343)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/plugin-amp-sidebar-chooser-appears-that-it-doesnt-work-with-custom-page-templates/#post-2126363)
 * Ah, yes – the function has to be called within the context of the page’s main
   query (ie, the “single” loop for posts and pages.)
 * If run outside the main query, the function should still “work,” but it will 
   be retrieving the associated sidebar for the most recent queried content, not
   necessarily the page or post at hand.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[AMP Sidebar Chooser] [Plugin: AMP Sidebar Chooser] Appears that it doesn't work with custom page templates](https://wordpress.org/support/topic/plugin-amp-sidebar-chooser-appears-that-it-doesnt-work-with-custom-page-templates/)
 *  Plugin Author [amp343](https://wordpress.org/support/users/amp343/)
 * (@amp343)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/plugin-amp-sidebar-chooser-appears-that-it-doesnt-work-with-custom-page-templates/#post-2126340)
 * Hey Tzaddi,
 * I tried duplicating the scenario you described, but couldn’t create the same 
   problem; when I switched a page between 2 page templates (both with `amp_get_sidebar()`
   included) my AMP sidebar stayed the same on both versions without reverting to
   the default.
 * I’m sure you’ve already checked this, but the issue that comes to mind is your
   second template might contain the generic sidebar function `get_sidebar()` instead
   of the needed `amp_get_sidebar()` function.
 * If you want to troubleshoot and ensure the template that you intend is actually
   being used, try this plugin: [http://wordpress.org/extend/plugins/show-template/](http://wordpress.org/extend/plugins/show-template/).
   It prints an html comment that shows which template is being rendered.
 * Let me know if you’re able to resolve this or if the issue persists.
    Thanks,
   Andrew
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Plugin: The Events Calendar] Want to show 5 upcoming events outside of the sidebar](https://wordpress.org/support/topic/plugin-the-events-calendar-want-to-show-5-upcoming-events-outside-of-the-sidebar/)
 *  [amp343](https://wordpress.org/support/users/amp343/)
 * (@amp343)
 * [14 years, 12 months ago](https://wordpress.org/support/topic/plugin-the-events-calendar-want-to-show-5-upcoming-events-outside-of-the-sidebar/page/2/#post-1518789)
 * [@r3volution11](https://wordpress.org/support/users/r3volution11/) Thanks for
   this fix. Your comparison of the event start date meta value vs. the current 
   time enabled me to successfully query past and upcoming events (by changing the
   meta_compare), whereas the built-in parameter eventDisplay never quite worked.
 * Does posts_per_page still not work as you expect it in this context? I changed
   my value to 1 (to just show the very next or previous event), and it seems to
   work.
 * Thanks again for the fix.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Breadcrumb NavXT] [Plugin: Breadcrumb NavXT] Custom post type support](https://wordpress.org/support/topic/plugin-breadcrumb-navxt-custom-post-type-support/)
 *  [amp343](https://wordpress.org/support/users/amp343/)
 * (@amp343)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-breadcrumb-navxt-custom-post-type-support/page/4/#post-1640977)
 * I have a little hack/workaround that seems to be working for displaying breadcrumbs
   with Custom Post Type Archive pages (3.1+).
 * I want to get my breadcrumb looking like this:
    Home > Custom Post Type Archive
   > Custom Post Type Single
 * However, natively the plugin only generates this:
    Home > Custom Post Type Single
 * The caveat is that you’re allowed to manually select a page as a “root”. This
   is where you can trick the plugin into displaying your custom post archive page
   as part of the breadcrumb.
 * Say for instance my custom post archive URL is [http://www.site.com/albums/](http://www.site.com/albums/).
   To get this archive to show up in the breadcrumbs, I just created a page to “
   mimic” this URL called “albums”, and set its permalink to the exact same thing.
   That way, I’m allowed to select that page as a breadcrumb root — yet when the
   page is actually rendered, it generates the Custom Post Type Archive that lives
   at the same URL, not the dummy page.
 * Not saying this is a good idea, but it works for me!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[The Events Calendar] [Plugin: The Events Calendar] Solved! How to show past and future events (the missing documentation)](https://wordpress.org/support/topic/plugin-the-events-calendar-solved-how-to-show-past-and-future-events-the-missing-documentation/)
 *  [amp343](https://wordpress.org/support/users/amp343/)
 * (@amp343)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-the-events-calendar-solved-how-to-show-past-and-future-events-the-missing-documentation/#post-1751701)
 * [@jrgreenfield1](https://wordpress.org/support/users/jrgreenfield1/),
 * > Thanks, I don’t think it does because that would effect the rest of the site
   > as well.
 * The code below works really well, but I’m only looking to grab 2-3 events. Not
   sure where I would put the loop though
 * Can’t you just add the parameter ‘posts_per_page=x’ to your query_string() call?
   So, `query_posts($query_string . '&category_name=events&posts_per_page=2');` ,
   for example? Seems like that should work.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[CSV Importer] [Plugin: CSV Importer] All fields in CSV file must be enclosed in double quotes?](https://wordpress.org/support/topic/plugin-csv-importer-all-fields-in-csv-file-must-be-enclosed-in-double-quotes/)
 *  [amp343](https://wordpress.org/support/users/amp343/)
 * (@amp343)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/plugin-csv-importer-all-fields-in-csv-file-must-be-enclosed-in-double-quotes/#post-1625971)
 * Switching from Excel to OpenOffice worked to solve this problem for my CSV import
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Gallery Shortcode for REL tag?](https://wordpress.org/support/topic/gallery-shortcode-for-rel-tag/)
 *  [amp343](https://wordpress.org/support/users/amp343/)
 * (@amp343)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/gallery-shortcode-for-rel-tag/#post-1409800)
 * Is there an advantage of actually printing out the explicit “rel” value for each
   of your image links, vs. setting prettyPhoto with jQuery?
 * Just off the top of my head, I would think it would be pretty easy to just say,
 *     ```
       $(document).ready(function(){
   
          $(".gallery a").prettyPhoto();
   
       });
       ```
   
 * … or something of the like? to make all `<a>` tags inside elements with the .
   gallery class receive the prettyPhoto behavior.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Easy way to compare my WordPress folder to standard install?](https://wordpress.org/support/topic/easy-way-to-compare-my-wordpress-folder-to-standard-install/)
 *  Thread Starter [amp343](https://wordpress.org/support/users/amp343/)
 * (@amp343)
 * [16 years ago](https://wordpress.org/support/topic/easy-way-to-compare-my-wordpress-folder-to-standard-install/#post-1471321)
 * ^ Yes, tedium is the main reason for not doing it that way.
 * If I have to, I have to, but not looking forward to spending a day that way.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Easy way to compare my WordPress folder to standard install?](https://wordpress.org/support/topic/easy-way-to-compare-my-wordpress-folder-to-standard-install/)
 *  Thread Starter [amp343](https://wordpress.org/support/users/amp343/)
 * (@amp343)
 * [16 years ago](https://wordpress.org/support/topic/easy-way-to-compare-my-wordpress-folder-to-standard-install/#post-1471302)
 * Hey jdembowski, thanks for the reply.
 * I tried out your suggestion, however it’s not quite what I’m looking to do. It
   does do a good job of showing which files exist / don’t exist between the two
   directories, though, so I’ll have to keep that snippet on hand in case I need
   to refer to it, thanks.
 * In this case, I’m trying to figure out if the contents of each file is different.
   I know that the file names and locations will be mostly the same. The real question
   is which files have inconsistent contents. Any other suggestions?
 * I’m totally useless with this UNIX command type of stuff, but your first suggestion
   seems to be a good start.
 * Thanks again!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [Custom Fields Template erases values when updating post](https://wordpress.org/support/topic/custom-fields-template-erases-values-when-updating-post/)
 *  Thread Starter [amp343](https://wordpress.org/support/users/amp343/)
 * (@amp343)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/custom-fields-template-erases-values-when-updating-post/#post-1428162)
 * Hey poil –
 * That’s a good thought – but it didn’t end up being the problem.
 * Apparently, the issue was that the meta_id column in the wp_postmeta table had
   been altered (by some sort of plugin? I had a ton installed trying to pick the
   best one for custom field management) so that the primary key and auto-increment
   had been removed.
 * I uninstalled all my custom fields plugins. Then I went into my phpMyAdmin, restored
   these attributes to the wp_postmeta > meta_id column, and the plugin seems to
   be working according to plan.
 * We’ll see if it stays that way!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Plugin: Custom Field Template] Default values not working](https://wordpress.org/support/topic/plugin-custom-field-template-default-values-not-working/)
 *  Thread Starter [amp343](https://wordpress.org/support/users/amp343/)
 * (@amp343)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/plugin-custom-field-template-default-values-not-working/#post-1420483)
 * Hmm… a re-activation of the plugin seemed to do the trick – but make sure you
   save your CSS and other custom settings before doing that, if you experience 
   the same thing.
 * So hopefully, this solved it.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [[Plugin: Custom Field Template] output of checkboxes](https://wordpress.org/support/topic/plugin-custom-field-template-output-of-checkboxes/)
 *  [amp343](https://wordpress.org/support/users/amp343/)
 * (@amp343)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/plugin-custom-field-template-output-of-checkboxes/#post-1158285)
 * You could also try
 * `<?php echo get_post_meta($post->ID, 'Favorite Fruits', false); ?>`
 * …with the last argument FALSE instead of true. That argument tells the function
   whether or not to return a single value.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [Sort by custom field not working](https://wordpress.org/support/topic/sort-by-custom-field-not-working/)
 *  Thread Starter [amp343](https://wordpress.org/support/users/amp343/)
 * (@amp343)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/sort-by-custom-field-not-working/#post-1385564)
 * Well, looks like I’m able to answer my own question after researching a bit more:
 * When you try to sort by a numeric query using the query_posts() function, PHP
   interprets it as a string. So, 10 is interpreted as “1”, etc… which, you can 
   imagine, throws the sorting all off.
 * In order to get around this, I had to use a custom select query rather than the
   query_posts() function – and also use this fix as part of my query:
 * [http://wordpress.org/support/topic/286391?replies=12](http://wordpress.org/support/topic/286391?replies=12)
 * Essentially, including this line
    `ORDER BY wpostmeta.meta_value+0 DESC` forces
   the field to be interpreted as an integer rather than a string – exactly what
   I was trying to do. Sorting works just as I had intended.

Viewing 15 replies - 1 through 15 (of 30 total)

1 [2](https://wordpress.org/support/users/amp343/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/amp343/replies/page/2/?output_format=md)