278 reputation
1514
bio website steffirakotozafy.com
location Paris, France
age
visits member for 4 years, 3 months
seen Mar 18 at 9:56

Jan
17
revised How to order posts of a custom post type by date DESC in dashboard Admin?
edited title
Jan
17
comment How to order posts of a custom post type by date DESC in dashboard Admin?
Oh sorry, I would like to add the order_by in the Wordpress Admin
Jan
17
asked How to order posts of a custom post type by date DESC in dashboard Admin?
Jan
12
comment How to do some action weekly?
I think $wpdb must be $wpdb->prefix because in my database it's not "wp_" but "wp_new"
Jan
12
comment How to do some action weekly?
It seems your query doesn't work. I try something else. Check my answer.
Jan
12
answered How to do some action weekly?
Jan
12
comment How to do some action weekly?
Nothing happened... :/
Jan
12
comment How to do some action weekly?
:o It doesn't work ! Even with id directly... It awalays removes Photos instead of News (For information, Photos is the category by default, maybe it's the problem ?)
Jan
12
comment How to do some action weekly?
Yep, in any case I'm sure I didn't write get_cat_ID('Photos') :p
Jan
12
comment How to do some action weekly?
It's really weird. It deletes me the wrong category lol. I have multiple categories on the post "Photos, News, Red" but it removes Photos. I don't know why... (By the way, the cron works fine)
Jan
12
comment How to do some action weekly?
Huh !!! Yes, you're right ! Totally right. Otherwise $wpdb->prepare( "DELETE FROM $wpdb->term_relationships WHERE object_id = $post_id AND term_taxonomy_id = $category_id" ) doesn't work, I had to add "%d" and "%d" to get this : $wpdb->prepare( "DELETE FROM $wpdb->term_relationships WHERE object_id = %d AND term_taxonomy_id = %d", $post_id, $category_id )
Jan
12
comment How to do some action weekly?
Huh... So the hook is fired for each post ? At the same time when I publish the post, right ? It's also good. However, my approach was to get all posts with the category News and fires the hook after 7 days (only one event per week). In your case, if I created 12 posts, I will get 12 schedule event ?
Jan
11
comment How to do some action weekly?
I have a question : Why do you add_action with publish_post ? I don't understand this point.
Jan
11
accepted How to do some action weekly?
Jan
11
comment How to do some action weekly?
Looks good... Looks amazing ! Thank you @OriginalEXE :D
Jan
11
revised How to do some action weekly?
added 6 characters in body; edited title
Jan
11
comment How to do some action weekly?
I don't want to delete post, and I want to delete the category "News" of the post.
Jan
11
asked How to do some action weekly?
Oct
17
awarded  Popular Question
Sep
27
awarded  Popular Question