Title: heavym's Replies | WordPress.org

---

# heavym

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

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

 Search replies:

## Forum Replies Created

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

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [is there a bug with trash function??](https://wordpress.org/support/topic/is-there-a-bug-with-trash-function-1/)
 *  [heavym](https://wordpress.org/support/users/heavym/)
 * (@heavym)
 * [16 years ago](https://wordpress.org/support/topic/is-there-a-bug-with-trash-function-1/page/2/#post-1354482)
 * [Resolved] 1 ) Make sure you delete the original article first and when in your
   post or custom post type at the top where it says Trash(1) empty your trash. 
   This has been mentioned before.
 * What was not mentioned was after changing the url from “name2” to “name” do not
   click “update” you must first click “ok” to commit the permalink change, then
   click “update”. Problem solved and tested in WordPress 3.0b2.
 * Cheers,
    Christopher Beckwith
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [is there a bug with trash function??](https://wordpress.org/support/topic/is-there-a-bug-with-trash-function-1/)
 *  [heavym](https://wordpress.org/support/users/heavym/)
 * (@heavym)
 * [16 years ago](https://wordpress.org/support/topic/is-there-a-bug-with-trash-function-1/page/2/#post-1354480)
 * This happens in WordPress 3.0 with a custom post type as well exactly as others
   have noted. Tried emptying the trash and their are no revisions enabled for this
   custom post type. Hopefully someone solves this one, other than starting from
   scratch. I did a search in all tables in the database and it only fiends “name2”
   rather than “name”.
 *   Forum: [Alpha/Beta/RC](https://wordpress.org/support/forum/alphabeta/)
    In 
   reply to: [3.0 Alpha, menu not working suddenly?](https://wordpress.org/support/topic/30-alpha-menu-not-working-suddenly/)
 *  [heavym](https://wordpress.org/support/users/heavym/)
 * (@heavym)
 * [16 years ago](https://wordpress.org/support/topic/30-alpha-menu-not-working-suddenly/#post-1446595)
 * As I was having trouble ordering my menu which was a mix of categories and pages,
   I decided to try out the new menu system in 3.0 and with Michael’s code above,
   it works perfectly. Just have to reapply my styles now.
 * Cheers,
    Christopher
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [Custom Meta boxes for Custom Post Type in 3.0?](https://wordpress.org/support/topic/custom-meta-boxes-for-custom-post-type-in-30/)
 *  Thread Starter [heavym](https://wordpress.org/support/users/heavym/)
 * (@heavym)
 * [16 years ago](https://wordpress.org/support/topic/custom-meta-boxes-for-custom-post-type-in-30/#post-1479366)
 * Also, the content from the original article above is actually from WPEngineer(
   as noted on that site): [http://wpengineer.com/example-how-to-add-meta-boxes-to-edit-area](http://wpengineer.com/example-how-to-add-meta-boxes-to-edit-area)
 * And I have been able to add the plugin code to my functions.php file. My main
   hurtle is needing to know how to apply all that to just one new custom post type
   rather than the default post type which is does currently.
 * The other question would be how to create a text box option in the meta boxes
   as well in the code above. Thank you!
 * Cheers,
    Christopher
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [Custom Post Type Query Issue](https://wordpress.org/support/topic/custom-post-type-query-issue/)
 *  Thread Starter [heavym](https://wordpress.org/support/users/heavym/)
 * (@heavym)
 * [16 years ago](https://wordpress.org/support/topic/custom-post-type-query-issue/#post-1478820)
 * Thank you Michael. I actually figured out the issue. Posted my resolution above.
   But thank you for taking the time to diagnosis. Now I’m tackling meta boxes for
   custom post types. Wish me luck, I may be back!
 * Cheers,
    Christopher
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [Custom Post Type Query Issue](https://wordpress.org/support/topic/custom-post-type-query-issue/)
 *  Thread Starter [heavym](https://wordpress.org/support/users/heavym/)
 * (@heavym)
 * [16 years ago](https://wordpress.org/support/topic/custom-post-type-query-issue/#post-1478684)
 * I totally figured it out. (Chris goes to buy himself a Starbucks coffee.
 * Two things:
 * First, thank you Michael again for noting in my post type I had =property. Because
   even though in my code I have =featured that got me thinking to look in my functions.
   php and I actually had the post type called “feature” without the d.
 * That was certainly an issue, and then I realized at some point I lost the $ in
   front of the wp_query. So with those two fixes it now works. Woot!
 * Cheers,
    Christopher
 * PS – I heart WordPress
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [Custom Post Type Query Issue](https://wordpress.org/support/topic/custom-post-type-query-issue/)
 *  Thread Starter [heavym](https://wordpress.org/support/users/heavym/)
 * (@heavym)
 * [16 years ago](https://wordpress.org/support/topic/custom-post-type-query-issue/#post-1478683)
 * So ultimately, I need to replace:
 * `query_posts("showposts=$featured_num&cat=".get_catId($featured_cat));`
 * with
 * `WP_Query("post_type=featured&post_status=publish&posts_per_page=5");`
 * and add `global $wp_query;` above the if statement.
 * So instead of this:
 * > if (get_option(‘wdg_use_pages’) == ‘false’) query_posts(“showposts=$featured_num&
   > cat=”.get_catId($featured_cat));
   >  else {
 * I would do this:
 * >  global $wp_query;
   >  if (get_option(‘wdg_use_pages’) == ‘false’) wp_query = new WP_Query(“post_type
   > =featured&post_status=publish&posts_per_page=5”);
   >  else {
 * When I do that with debugging on I get, “Parse error: syntax error, unexpected‘
   =’ ” on the line in question. I tried changing the = to == got a different error
   and then it started doing the slideshow but with every post in the CMS rather
   than just the specified post type.
 * Also in my functions file I have this:
 * > /*Add Feature Custom Post Type*/
   >  register_post_type(‘featured’, array( ‘label’
   > => __(‘Featured’), ‘singular_label’ => __(‘Feature’), ‘public’ => 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, ‘rewrite’ => array(“slug” => “featured”), // Permalinks
   > format ‘supports’ => array(‘title’,’page-attributes’,’custom-fields’,’editor’,’
   > thumbnail’,’excerpt’) ));
 * I’ll keep looking and experimenting on my own, but if anyone knows where I should
   devote my efforts please do!
 * Cheers,
    Christopher
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [Custom Post Type Query Issue](https://wordpress.org/support/topic/custom-post-type-query-issue/)
 *  Thread Starter [heavym](https://wordpress.org/support/users/heavym/)
 * (@heavym)
 * [16 years ago](https://wordpress.org/support/topic/custom-post-type-query-issue/#post-1478667)
 * Sorry, my bad.
 * That code was from the example site. On the site I’m having the issue however
   I am using post_type=featured.
 * wp_query = new WP_Query(“post_type=featured&post_status=publish&posts_per_page
   =5”);
 * Thank you!
 * Cheers,
    Christopher
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [How to get an Action Hook to work as expected?](https://wordpress.org/support/topic/how-to-get-an-action-hook-to-work-as-expected/)
 *  Thread Starter [heavym](https://wordpress.org/support/users/heavym/)
 * (@heavym)
 * [16 years ago](https://wordpress.org/support/topic/how-to-get-an-action-hook-to-work-as-expected/#post-1471418)
 * Spoke with a PHP guy, had to change the code a bit by echoing HTML lines and 
   not others. So was just a matter of syntax.
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [How to get an Action Hook to work as expected?](https://wordpress.org/support/topic/how-to-get-an-action-hook-to-work-as-expected/)
 *  Thread Starter [heavym](https://wordpress.org/support/users/heavym/)
 * (@heavym)
 * [16 years ago](https://wordpress.org/support/topic/how-to-get-an-action-hook-to-work-as-expected/#post-1471291)
 * Oh and to note if in the function I write: `echo '<div id="random">test</div>';`
   for instance that does work. If I do an echo for the code above however it just
   spits out the actual code rather than rendering it.
 * I’ve tried echoing just the divs, and no the php code, but the page continues
   to go blank. Any ideas? Thank you!
 * Cheers,
    Christopher
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [Functions.php When Upgrading?](https://wordpress.org/support/topic/functionsphp-when-upgrading/)
 *  Thread Starter [heavym](https://wordpress.org/support/users/heavym/)
 * (@heavym)
 * [16 years ago](https://wordpress.org/support/topic/functionsphp-when-upgrading/#post-1466523)
 * Great, thanks!
 * Cheers,
    Christopher

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