1 reputation
2
bio website
location
age
visits member for 1 year, 7 months
seen Jun 21 at 20:58

Jan
15
comment Insert/Update DB table when making new post or update older one
Thanks. I will go to sleep now and check it out tomorrow.
Jan
15
comment Insert/Update DB table when making new post or update older one
Yes. New post - I write on it and when I finish it (2-5 minutes) I publish. 2 rows in total.
Jan
15
comment Insert/Update DB table when making new post or update older one
Same result. 2 rows inserted
Jan
15
comment Insert/Update DB table when making new post or update older one
Updated. Please note that I used this as a new post. Maybe there is some special condition for drafts?
Jan
15
revised Insert/Update DB table when making new post or update older one
added 1091 characters in body
Jan
15
comment Insert/Update DB table when making new post or update older one
I added both codes and started a new post. After 2-3 minutes, i already had 2 entries in the db.
Jan
15
comment Insert/Update DB table when making new post or update older one
Not really working.
Jan
15
comment Insert/Update DB table when making new post or update older one
And this helps me how? I don`t need to create tables or a how to use $wpdb. I need to update a table ONLY when I publish or update an wordpress article.
Jan
15
asked Insert/Update DB table when making new post or update older one
Nov
22
asked Archive filtering
Jun
22
comment Custom query to show posts
Thanks for helping me out.
Jun
22
comment Custom query to show posts
Here`s a fun fact. If I sort ASC instead of DESC the order is right. Just that when it shows the posts, starts with those with 0 comments and 0 ratings, continuing in the right order...
Jun
22
comment Custom query to show posts
SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts INNER JOIN wp_postmeta ON (wp_posts.ID = wp_postmeta.post_id) WHERE 1=1 AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish') AND (wp_postmeta.meta_key = 'ratings_average' ) GROUP BY wp_posts.ID ORDER BY wp_postmeta.meta_value,wp_posts.comment_count DESC LIMIT 0, 5)
Jun
22
comment Custom query to show posts
For example I have a post with 5 average rating, 0 comments. I have one with 4 average rating and 3 comments, and I have another one with 5 average and 2 comments. By using that exact code the order is just as I wrote it...should be 1 3 2.
Jun
22
comment Custom query to show posts
If I use this: $args = array( 'posts_per_page' => 5, 'paged' => $paged, 'meta_key' => 'ratings_average', 'orderby' => 'meta_value comment_count', 'order' => 'DESC' ); it works somehow. But it`s not filtering right.
Jun
22
comment Custom query to show posts
Yes, but I also need to sort it DESC by comments number.
Jun
22
asked Custom query to show posts
Apr
22
comment Classic Custom Post Types and WP-PageNavi
It`s now live on my website. No change.
Apr
22
asked Classic Custom Post Types and WP-PageNavi
Mar
3
asked Filtering problem