Title: robbono's Replies | WordPress.org

---

# robbono

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

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

 Search replies:

## Forum Replies Created

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

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [WordPress custom index.php frontpage – paging issue (/page2, etc)](https://wordpress.org/support/topic/wordpress-custom-indexphp-frontpage-paging-issue-page2-etc/)
 *  Thread Starter [robbono](https://wordpress.org/support/users/robbono/)
 * (@robbono)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/wordpress-custom-indexphp-frontpage-paging-issue-page2-etc/#post-1668863)
 * I have neither in my code.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Permalinks 404 with custom post type.](https://wordpress.org/support/topic/permalinks-404-with-custom-post-type/)
 *  [robbono](https://wordpress.org/support/users/robbono/)
 * (@robbono)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/permalinks-404-with-custom-post-type/#post-1508489)
 * Note: I’ve also read through Otto’s responses on the automattic mailing list,
   as seen here:
 * [http://lists.automattic.com/pipermail/wp-testers/2010-May/013017.html](http://lists.automattic.com/pipermail/wp-testers/2010-May/013017.html)
 * If I read this correctly, he seems to be saying that Permalinks for custom content
   types won’t work at all if you have %postname% in your Settings > Permalinks 
   permalink structure. Can someone confirm for me that this is true?
 * If so…well, that’s a little klorbed, I suppose, since almost everyone I know 
   uses %postname% in their permalinks for SEO purposes.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Permalinks 404 with custom post type.](https://wordpress.org/support/topic/permalinks-404-with-custom-post-type/)
 *  [robbono](https://wordpress.org/support/users/robbono/)
 * (@robbono)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/permalinks-404-with-custom-post-type/#post-1508488)
 * I am having the
    - exact
 *  same problem as the original poster described.
 * I have my overall permalink structure set to:
    /%category%/%postname%.
 * If I browse to
    [http://mysite.com/?event=heres-a-title](http://mysite.com/?event=heres-a-title)
 * I get redirected successfully to
    [http://mysite.com/event/heres-a-title/?event=heres-a-title](http://mysite.com/event/heres-a-title/?event=heres-a-title)
 * But if I browse to the link that WordPress generates:
    [http://mysite.com/event/heres-a-title/](http://mysite.com/event/heres-a-title/)
 * I end up with a 404.
 * I’ve tried to rebuild my .htaccess file using Settings > Permalinks, but this
   has not fixed the issue.
 * I don’t expect the custom content types to work with with my permalink structure
   in terms of categories; I only expect that the Rewrite function for WordPress’s
   register_post_type() function will work as described. Unfortunately, it does 
   not seem to work.
 * Changing my permalink structure doesn’t fix the problem.
 * Is there anyone out there who has actually successfully implemented custom post
   types with url rewriting?
 * For your reference, the code I’m using is:
 * `'add_action( 'init', 'create_post_type' );
    function create_post_type() { register_post_type('
   event', array( 'labels' => array( 'name' => __( 'Events' ), 'singular_name' =
   > __( 'Event' ) ), 'public' => true, 'rewrite' => true, 'show_ui' => true, //
   UI in admin panel '_builtin' => false, // It's a custom post type, not built 
   in! '_edit_link' => 'post.php?post=%d', 'capability_type' => 'post', 'hierarchical'
   => false, 'supports' => array('title','author') ) ); }
 * Is this a bug? Misconfiguration on my end? A misunderstanding of what “rewrite”
   means in the Codex? Any help would be much appreciated.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Plugin: WP-Hashcash] WP Hashcash is putting all comments into the spam queue](https://wordpress.org/support/topic/plugin-wp-hashcash-wp-hashcash-is-putting-all-comments-into-the-spam-queue/)
 *  [robbono](https://wordpress.org/support/users/robbono/)
 * (@robbono)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/plugin-wp-hashcash-wp-hashcash-is-putting-all-comments-into-the-spam-queue/#post-1001148)
 * Having the exact same problem – all comments seem to be ending up in the spam
   queue. Any ideas on some steps I can take to fix this?
 * It’s my first time installing the plugin, so there’s nothing buggy left over 
   from previous installations.
 * I’m installing on WordPress 2.8.4
 * Thanks!
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Styling multiple-page posts](https://wordpress.org/support/topic/styling-multiple-page-posts/)
 *  [robbono](https://wordpress.org/support/users/robbono/)
 * (@robbono)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/styling-multiple-page-posts/#post-1215595)
 * [@stvwlf](https://wordpress.org/support/users/stvwlf/) – Yep, I could use $post-
   >post_content, but what I’m trying to display is a poll using WP-Polls – so the
   content only displays as [poll-id: 8], which triggers WP-Polls to display the
   poll. It only works when it’s run through the_content(), not when echoed as a
   variable. My knowledge of filters doesn’t go far enough for me to figure out 
   how to get it to trigger WP-Polls plugin, so I’m just going to have to hide the
   block until the sidebar issue is fixed.
 * BTW, I’m using a custom WP-Query, but there’s a reported bug with WordPress not
   clearing out globals on the 2nd page (even when using wp_reset_query() ), so 
   no matter what I do, the_content() always displays the wrong content – but that’s
   a topic for another post.
 * Thanks again for the conditional advice! I’ll be using that for now!
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Styling multiple-page posts](https://wordpress.org/support/topic/styling-multiple-page-posts/)
 *  [robbono](https://wordpress.org/support/users/robbono/)
 * (@robbono)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/styling-multiple-page-posts/#post-1215396)
 * Great! At least if I can’t fix the sidebar the_content() bug, I can disable the
   block in question on the 2nd and later posts. Thanks again!
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Strange the_content() behavior on paginated posts is driving me insane!](https://wordpress.org/support/topic/strange-the_content-behavior-on-paginated-posts-is-driving-me-insane/)
 *  Thread Starter [robbono](https://wordpress.org/support/users/robbono/)
 * (@robbono)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/strange-the_content-behavior-on-paginated-posts-is-driving-me-insane/#post-1214202)
 * There is a .diff patch attached to
 * [http://core.trac.wordpress.org/ticket/9256](http://core.trac.wordpress.org/ticket/9256)
 * that supposedly fixes the problem by resetting a bunch of globals that WordPress
   leaves around in wp_reset_query.
 * I’ve implemented the patch, and done a wp_reset_query(); both immediately before
   and immediately after the sidebar loop, as shown here:
 *     ```
       <?php
       wp_reset_query();
       $polls_cat = "45";
       $poll_query = new WP_Query('cat='.$polls_cat.'&showposts=1&orderby=date&order=DESC');
       while ($poll_query->have_posts()) : $poll_query->the_post(); wp_reset_query(); ?>
       <h2 id="pollboxtitle"><?php the_title(); ?></h2>
       <div id="featuredpicture">
       <img height="200px" width="300px" src="<?php echo get_post_meta($post->ID, 'thumbnail',true); ?>" alt="Post Image" class="postimg" />
       <div class="caption"><?php echo get_post_meta($post->ID, 'thumbnailcaption',true); ?></div>
       </div> <!-- /featuredpicture -->
       <?php the_content('');
       ?>
       <?php endwhile; ?>
       ```
   
 * However, the problem is still there. Am I using wp_reset_query() wrong here? 
   I’m using it in single.php as well as in the sidebar, and no matter where I bust
   it out, I’m always seeing the content of the post in the sidebar.
 * So…still not working, and the Trac report has been closed, meaning that it’s 
   apparently been shown to work. What am I doing wrong here?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Styling multiple-page posts](https://wordpress.org/support/topic/styling-multiple-page-posts/)
 *  [robbono](https://wordpress.org/support/users/robbono/)
 * (@robbono)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/styling-multiple-page-posts/#post-1215377)
 * I have the same question. There is a bug in WordPress that causes the_content
   not to work properly in sidebars after pagination (i.e., the_content() works 
   in sidebars on page 1 of a paginated post, but not on subsequent pages 2, 3, 
   4, 5, etc).
 * Because of this, I want to disable a sidebar block based on whether or not it’s
   the first page of a paginated post. Therefore, the aforementioned solution (for
   styling purposes) will not work for me.
 * WordPress has some way of knowing what page it is – some kind of property. What
   is this property, and how can I create a conditional statement using it?
 * Thanks!
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [the_content in sidebar](https://wordpress.org/support/topic/the_content-in-sidebar/)
 *  [robbono](https://wordpress.org/support/users/robbono/)
 * (@robbono)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/the_content-in-sidebar/#post-1004343)
 * I’m having this exact same problem as documented here:
 * [http://wordpress.org/support/topic/311568?replies=6#post-1214730](http://wordpress.org/support/topic/311568?replies=6#post-1214730)
 * This bug was reported six months ago, yet it doesn’t seem to have been fixed 
   yet.
 * In my case, I cannot simply echo $post->post_content; because I’m trying to display
   a poll using WP-Polls, and WP-Polls only renders the content when it’s accessed
   through the_content(); when I echo the post_content, I see this:
 * `[poll id="28"]`
 * Which is the tag for WP-Polls to display a poll.
 * Any ideas on how I can get this to work? Barring that, is there a conditional
   tag I can use to check if the post is showing paginated pages 2,3,4,5, etc, so
   that I can simply remove this block from display on those pages until the bug
   is fixed?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Strange the_content() behavior on paginated posts is driving me insane!](https://wordpress.org/support/topic/strange-the_content-behavior-on-paginated-posts-is-driving-me-insane/)
 *  Thread Starter [robbono](https://wordpress.org/support/users/robbono/)
 * (@robbono)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/strange-the_content-behavior-on-paginated-posts-is-driving-me-insane/#post-1214199)
 * Well, it worked, and it didn’t. Although it solved the problem, now the block
   is showing the following:
 * `[poll id="28"]`
 * Which is the template tag that WP-Poll uses to display a particular poll. It 
   seems that WP-Polls will only render a poll when it’s accessed through the_content()–
   which means that I have a problem, since the_content() doesn’t seem to be working
   in sidebars.
 * Anyone have any suggestions, or know anything about this bug? In the WP Trac,
   it says “Milestone -> 2.8”, but I’m using 2.8 and the bug isn’t fixed.
 * Ideas?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Strange the_content() behavior on paginated posts is driving me insane!](https://wordpress.org/support/topic/strange-the_content-behavior-on-paginated-posts-is-driving-me-insane/)
 *  Thread Starter [robbono](https://wordpress.org/support/users/robbono/)
 * (@robbono)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/strange-the_content-behavior-on-paginated-posts-is-driving-me-insane/#post-1214198)
 * I’ve done some more Googling and have found some more posts on the topic. It 
   seems that a temporary workaround is to use echo $post->post_content. More information
   here:
 * [http://wordpress.org/support/topic/248632?replies=3](http://wordpress.org/support/topic/248632?replies=3)
 * and a WordPress Trac report here:
 * [http://lists.automattic.com/pipermail/wp-trac/2009-March/039961.html](http://lists.automattic.com/pipermail/wp-trac/2009-March/039961.html)
 * I’m going to test out the workaround now and I’ll post up here for other people
   who want to use the_content() in the sidebar if it works.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Strange the_content() behavior on paginated posts is driving me insane!](https://wordpress.org/support/topic/strange-the_content-behavior-on-paginated-posts-is-driving-me-insane/)
 *  Thread Starter [robbono](https://wordpress.org/support/users/robbono/)
 * (@robbono)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/strange-the_content-behavior-on-paginated-posts-is-driving-me-insane/#post-1214193)
 * Hi t31os_ – thanks for the suggestion! However, when I tried changing the code
   as you suggested, as such:
 *     ```
       $polls_cat = "45";
       $poll_query = new WP_Query('cat='.$polls_cat.'&showposts=1&orderby=date&order=DESC');
       while ($poll_query->have_posts()) : $poll_query->the_post(); setup_postdata($posts); ?>
       ...
       <?php the_content('');
       ```
   
 * Unfortunately, it didn’t have any effect on the problem – I still see the content
   of the second page of the paginated post when I try to use the_content() in the
   sidebar loop query I’ve created. Any other thoughts?
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Strange the_content() behavior on paginated posts is driving me insane!](https://wordpress.org/support/topic/strange-the_content-behavior-on-paginated-posts-is-driving-me-insane/)
 *  Thread Starter [robbono](https://wordpress.org/support/users/robbono/)
 * (@robbono)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/strange-the_content-behavior-on-paginated-posts-is-driving-me-insane/#post-1214149)
 * One addendum to this post – I previously stated the the_content() was _appending_
   the post’s content; in fact, it is **replacing** the post’s content – the actual
   poll content is the voting block area (this is all accomplished using Lester 
   Chan’s wp-polls plugin). The voting block itself is not showing; rather, the 
   post’s content is being output here.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [is_home() and is_front_page() known to be borked?](https://wordpress.org/support/topic/is_home-and-is_front_page-known-to-be-borked/)
 *  [robbono](https://wordpress.org/support/users/robbono/)
 * (@robbono)
 * [16 years, 8 months ago](https://wordpress.org/support/topic/is_home-and-is_front_page-known-to-be-borked/#post-1075990)
 * That simple <?php wp_reset_query(); ?> just totally rocked my world – I, too,
   use a highly customized frontpage with multiple loops, and I wanted to check 
   is_home() in the header.php to selectively load image preloading scripts and 
   other heavy javascripts.
 * is_home was totally borked until I used the wp_reset_query() right in front of
   the conditional, and now it works perfectly! Rock on! Thanks to t31os_ and tammyhart
   for the quick and easy solution!

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