fr33think3r
Forum Replies Created
-
Also it would be nice to be able to add more than one redirect at a time. A little cumbersome to add one, submit, wait, add another .. 🙂
Thanks
Agree about the permalink scenario, would be glad if you can add it as an option though, so that I/others don’t have to hack the plugin code everytime you upgrade the plugin 🙂
You might also want to set
'numberposts' => -1. Coz the count of the articles in the category is incorrect otherwise, it will always show 5 because get_posts gets 5 posts by default.Its just that that will be highly inefficient. There’s a sample code to count the number of posts in a category here.
May be you could use that.
I’m not sure.. have you tried it?
Just tried it, here’s the code that works for me, I can see my custom post types now 🙂
foreach((get_the_category()) as $category) { $args = array( 'post_type' => 'any', 'category' => $category->cat_ID, ); $posts = get_posts($args); foreach($posts as $post){ if (!in_array($post->ID, $all_posts)) { $all_posts[] = $post->ID; $all_posts_str .= $post->ID . ' '; } } } $all_posts_str = trim($all_posts_str); $posts_desc_args = array( 'post_type' => 'any', 'include' => $all_posts_str, 'orderby' => 'date', 'order' => 'DESC', ); $posts_desc = get_posts($posts_desc_args);If I’m not wrong custom posts aren’t categorized.
By default, yes they are not categorized, but adding categories to custom post types is easy, and I’m pretty sure a lot of people do that. For eg. On my blog http://www.humbug.in, the main page shows list of normal ‘post’ type while http://www.humbug.in/mblog/ shows a list of posts of a custom post type. You will see that all the custom post types are tagged and categorized.
Hope this helps.
Thanks Grzegorz for the release.
Any chance you could fix the custom post types issue too? I think it should be as simple as passing post_type = ‘any’ to get_posts on Line 25 in upprev.php.
@bhagwad, i noticed that bug too and wrote about it here: http://wordpress.org/support/topic/plugin-upprev-nytimes-style-next-post-animated-button-tiniest-of-bug-in-the-plugin?replies=1
A very simple change to get things working 🙂
Forum: Requests and Feedback
In reply to: p2 theme with a custom post type and a page templateI did have to change a bit of js, and some changes in ajax.php, but nothing major. Ajax gets called the same way as it is in the p2 theme. I just make sure the correct post_type gets used in wp_insert_post.
$post_id = wp_insert_post( array( 'post_author' => $user_id, 'post_title' => $post_title, 'post_content' => $post_content, 'post_type' => $p2_custom_post_type, 'post_category' => array( $post_cat->cat_ID ), 'tags_input' => $tags, 'post_status' => 'publish' ) );Forum: Fixing WordPress
In reply to: Tag counts incorrect in wp_term_taxonomy tableFigured out what the problem is, its a bug with simple tags plugin, doesn’t handle custom post types yet.
Forum: Fixing WordPress
In reply to: p2 publishing authorizationI am facing the same issue. Any solution?
Forum: Fixing WordPress
In reply to: Tag counts incorrect in wp_term_taxonomy tablebump
If you want to patch the plugin directly to support custom post types, look at http://www.humbug.in/aside/adding-custom-post-types-to-sitemap/. However guar’s solution is more elegant. Found his solution after I wrote the post 🙁
Thanks for the reply. Is there any plan of adding a wordpress dashboard widget (admin)? It would be convenient to see what’s popular and whats not.
Thanks a ton, that worked beautifully for me. Just added
require( dirname(__FILE__) . ‘/wp-load.php’ );
to what you gave.I don’t have a job right now, but am definitely gonna buy you a few beers, once I have one 🙂
How do I achieve that if I do not have access to phpMyAdmin or ssh? I just have sftp access. will it possible to write a query inside php, upload it and run it?
I don’t have access to phpMyAdmin, and have the same issue, how did you solve the issue?