Support » Plugin: Custom Post Type UI » [Plugin: Custom Post Type UI] WordPress 3.1 Broke my custom "Magazine" posts

  • Resolved tleitao

    (@tleitao)


    I upgraded to wordpress 3.1 and now all my custom “Magazine” posts do not work. My site is http://www.retrieverlife.com and my loop code is:

    <?php

    /**

    * The loop that displays posts.

    *

    * The loop displays the posts and the post content. See

    * http://codex.wordpress.org/The_Loop to understand it and

    * http://codex.wordpress.org/Template_Tags to understand

    * the tags used in it.

    *

    * This can be overridden in child themes with loop.php or

    * loop-template.php, where ‘template’ is the loop context

    * requested by a template. For example, loop-index.php would

    * be used if it exists and we ask for the loop with:

    * get_template_part( 'loop', 'index' );

    *

    * @package WordPress

    * @subpackage Twenty_Ten

    * @since Twenty Ten 1.0

    */

    ?>

    <!– This div holds the monthly feature article image –>

    <?php query_posts(‘post_type=magazine&cat=19&year=2011&monthnum=2’); ?>

    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

    <div class=”feature”>

    “>

    <!– This gets the image above each post dimensions are 600 X 400 –>

    <?php $imageAboveHeadline = get_post_meta($post->ID, ‘imageAboveHeadline’, $single = true); ?>

    <?php if($imageAboveHeadline !== ”) { ?>

    <img src=”<?php echo $imageAboveHeadline ; ?>” alt=”Top Image” />

    <?php } else { echo ”; } ?>

    </div><!– end feature–>

    <?php endwhile; ?>

    <?php endif; ?>

    <?php wp_reset_query(); ?>

    <!– This div holds the monthly articles –>

    <div class=”articles”>

    <!– Loop for getting monthly articles –>

    <?php if ( have_posts() ) :query_posts(‘post_type=Magazine&&year=2011&monthnum=2&posts_per_page=15&meta_key=priority&orderby=meta_value&order=ASC’); ?> <?php while ( have_posts() ) : the_post(); ?>

    • “>

      <!– This gets the image above each post dimensions are 186 X 124 –>

      <?php $imageAboveHeadline = get_post_meta($post->ID, ‘imageAboveHeadline’, $single = true); ?>

      <?php if($imageAboveHeadline !== ”) { ?>

      <img src=”<?php echo $imageAboveHeadline ; ?>” height=”124″ width=”186″ alt=”Top Image” />

      <?php } else { echo ”; } ?>

      <!– This displays the post’s category –>

      <h3><?php the_category(‘,’); ?></h3>

      <!– This displays the post’s title –>

      <h2>

      ” rel=”bookmark”title=” <?php the_title(); ?>”><?php the_title(); ?>

      </h2>

      <!– this displays the post’s excerpt –>

      <p>

      <?php the_excerpt(); ?>

      </p>

    • <?php endwhile; else: ?>

    • <h2>Not Found</h2>

      <p><?php _e(‘Sorry, no posts matched your criteria.’); ?></p>

    • <!–//end content loop–>

    <?php endif; ?>

    </div>

Viewing 6 replies - 1 through 6 (of 6 total)
  • I just checked your website, it seems to work again. How did you do that? I run a charity website joinforkids.org which has broken posts (nothing found) as well.

    Plugin Author Brad Williams

    (@williamsba1)

    I believe this is unrelated to the plugin. Check out this post:
    http://dre.im/if-pages-return-a-404-after-wordpress-3-1-upgrade/

    Thanks for your reply. I found a few posts telling me to reset the permalink structure. I did as described and added even some code to functions to achieve this. In the process of finding the solution, I switched back to the standard WP theme which resulted in below issue.

    Now the situation is that some custom post types work correctly, everything well. One custom post type is not showing (Nothing found message) and in admin I cannot Edit, only View.

    And there is another custom post type showing correctly on the site but also as admin not able to edit. I did an extensive search on that but couldn’t find any info on the web about this issue.

    If this is not related to your plugin, I am sorry to bother you. But do you know a solution anyway?

    Thanks!

    We basically ripped out the plug in and started from scratch. I had to hand edit the wp_post table for each post that had the custom post and change the post_type to “post” to get the post editable again. I will have the other half of our development effort (who did the heavy lifting) supply the code changes we did in functions.php.

    I have a similar problem. After update to 3.1 our site is no longer starting. We have an index.htm page that points to index.php under certain conditions. But no longer 🙁 Even if we enter url/index.pho it is always going to index.htm.

    @ tleitao That would be great if you could post the functions.php changes. Looking forward to it!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: Custom Post Type UI] WordPress 3.1 Broke my custom "Magazine" posts’ is closed to new replies.