heavym
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: is there a bug with trash function??[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 BeckwithForum: Fixing WordPress
In reply to: is there a bug with trash function??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
In reply to: 3.0 Alpha, menu not working suddenly?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,
ChristopherForum: Themes and Templates
In reply to: Custom Meta boxes for Custom Post Type in 3.0?Also, the content from the original article above is actually from WPEngineer (as noted on that site): https://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,
ChristopherForum: Themes and Templates
In reply to: Custom Post Type Query IssueThank 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,
ChristopherForum: Themes and Templates
In reply to: Custom Post Type Query IssueI 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,
ChristopherPS – I heart WordPress
Forum: Themes and Templates
In reply to: Custom Post Type Query IssueSo 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,
ChristopherForum: Themes and Templates
In reply to: Custom Post Type Query IssueSorry, 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,
ChristopherForum: Themes and Templates
In reply to: How to get an Action Hook to work as expected?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
In reply to: How to get an Action Hook to work as expected?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,
ChristopherForum: Themes and Templates
In reply to: Functions.php When Upgrading?Great, thanks!
Cheers,
Christopher