120 reputation
1215
bio website
location Lithuania
age
visits member for 3 years, 2 months
seen yesterday

Jun
27
comment Post Auto Draft Issue
Updated my code, but nothing has changed. I'm probably doing something wrong :) Also getting Notice: Use of undefined constant DOING_AUTOSAVE - assumed 'DOING_AUTOSAVE' in ...
Jun
27
comment Post Auto Draft Issue
Well, I set model and brand to '' and removed ext (updated my code). But I'm still not sure how to include DOING_AUTOSAVE correctly.
Jun
27
comment Post Auto Draft Issue
Could you show my how it's done with my current code as an answer? I've tried and failed. I'm not very good with coding :)
Jun
27
comment Post Auto Draft Issue
Well, as you can see in my question, I do populate it upon save. But the problem apears when I do not (forget to) save that post (close window, navigate away from the posts etc.). And even then title is getting populated (named "ID ###" instead of "Auto Draft").
Jun
27
comment Post Auto Draft Issue
I think it's default WordPress behavior. I deactivated all plugins and switched to 2010 and nothing changed. Posts with attachments but without title or content are not displayed in post list, but are saved under "Auto Draft" name (can be seen in Media's "Attached to" column).
Jun
27
comment Post Auto Draft Issue
Title is fine, even that draft get's correct title (ID #). Updated my question with code. If it's done via regular posts, post is named "Auto Draft", but same issue remains.
Jun
26
comment Delete post with all files attached to it
It works, that's great, thanks.
Jun
15
comment Custom Post Type with Custom Title
well, slug will look something like id-tax_term-tax_subterm, so it won't change very often and when it will, there will be pretty good reason for it... I guess :)
Jun
14
comment Custom Post Type with Custom Title
It works! Just had to set priority to 100 to work with Custom Field Template plugin. Is there any way to set custom slug too?
Jun
12
comment Hide “Gallery Settings” and “Insert into Post” button from Attachment window
It doesn't work and even if it did, I believe it would remove all buttons (thumbnail and delete). As for Gallery Options, that's what I did, but I thought there's better way to do it :)
May
29
comment Taxonomy dropdown metabox in the back-end
@Hameedullah this is great, thanks for solution :)
May
29
comment Taxonomy dropdown metabox in the back-end
@Hameedullah very nice. But I have a problem with it. I pasted all this code to my functions.php and when I go to the post back-end, I get this: Warning: define() expects at least 2 parameters, 1 given in (pointing to this line of code: if ( define('DOING_AUTOSAVE') && DOING_AUTOSAVE )).
May
28
comment Taxonomy menu with post count and multiple parents
Thanks, for now current code will do. I'm not good enough with PHP to dive in to that yet :)
May
28
comment Taxonomy menu with post count and multiple parents
@VicePrez Yes, it works, but I was asking if it's a good way to achieve all this. I mean, if I would need 3rd level for that menu (ex. car models: Ford Focus, Ford Mondeo, Ford Mustang etc.), I would need to duplicate some code to get it right. So maybe there's a better way to do it? :)
May
28
comment Taxonomy menu with post count and multiple parents
@VicePrez Well, I've changed query_posts() method to wp_query(), but other changes are not good for this :) Your query would print term link for each post: BMW (1) BMW (2) BMW (3). And I need to print it only once for each term. So query should end before <li> (foreach will handle it). Also $auto_brand->count will return post count of all posts in that term, not only New+BWM, but Used+BMW too and that was my problem in the first place :) I've edited my question again, to reflect this suggested wp_query change.
May
28
comment Taxonomy menu with post count and multiple parents
As it is now, post count displays number of all posts with that term (I would get BWM (5) in both parent terms), but I need to filter it by it's parrent term too. I managed to do it via query_posts, but not sure if it's a good way :) Updated my original question with a new code.