Twansparant
Forum Replies Created
-
Hi fireproofsocks,
First of all, thank you for this great plugin! I like it so much, that I switched from the Custom Post Type UI plugin to yours. I have some remarks/tips however to make it even better:
First of all, what crashintoty suggests would be very welcome indeed. Renaming the post_type name isn’t only very user friendly, but it will make switching between plugins even easier.
Another thing; your plugin doesn’t seem to support a dash in it’s post_type name. When you enter something like ‘custom-post‘ it will save it as ‘custom_post‘. If you happen to have created a custom post type called ‘custom-post‘ with another plugin, migrating gets very time consuming.
The last thing I’m really missing is the show_in_menu parameter. If you want to group certain custom post types in the admin menu, this parameter can be very convenient. Right now I have to add this function to my custom post type manually in my functions.php file like this:
add_action('init', 'codex_custom_init'); function codex_custom_init() { $labels = array( 'menu_name' => 'Child post type' ); $args = array( 'labels' => $labels, 'show_ui' => true, 'show_in_menu' => 'edit.php?post_type=parent-post-type' ); register_post_type('child-post-type',$args); }
Thanks for your work so far!
Cheers, ToineHi wpeck,
I’m trying to achive the same thing. I want to use this function on custom post types too. I got a bit further, the checkboxes are showing up now on custom post types;
On line 74 in select_featured_posts.php comment the post_type part:
if ($post->post_status == 'publish' && $post->post_password == '' /* && $post->post_type == 'post'*/ ) {
However, the custom post type won’t show up in the loop… Where do I need to change anything else in order to make this work?
Thanks for any help!
Hi Kapil Chugh!
Great plugin indeed, but I have the same wish/request as wpeck. Any updates on this?
Thanks!Forum: Fixing WordPress
In reply to: Change posts_per_page inside loop?Found a solution/workaround!
I modified my code a bit in order to let thewp_paginate()
function show the right amount of pages. The function can pass the total amount of pages and the current page as variables. However, if you pass ‘pages’ the highlighting of the current page stops working so you have to pass ‘page’ as well.My final code: https://pastebin.com/51r7PTwb
Forum: Fixing WordPress
In reply to: Change posts_per_page inside loop?Hi keesiemeijer,
Different code, same result unfortunately… But in this case the
wp_paginate();
doesn’t work anymore. It doesn’t show any pagination, when I replace it with:<?php next_posts_link('Older Entries ?', 0); ?> <?php previous_posts_link('? Newer Entries', 0); ?>
I get the same error as in my code; on page 2 the link to page 3 isn’t there… I don’t get it anymore.
My code: https://pastebin.com/SHqS7nFZ
Any other suggestions?
Thanks!Forum: Fixing WordPress
In reply to: Different post amounts shown per pagination page?Hi vtxyzzy,
I want to achieve the same thing as you but I can’t get it to work with proper pagination. In your sample code
wp_paginate();
doesn’t show any pagination… When I replace it with:<?php next_posts_link('Older Entries ?', 0); ?> <?php previous_posts_link('? Newer Entries', 0); ?>
The second page doesn’t show the ‘Older Entries’ link while there are more entries. Any ideas on that?
My code: https://pastebin.com/SHqS7nFZ
See my topic: change-posts_per_page-inside-loop
Thanks!
Forum: Fixing WordPress
In reply to: Change posts_per_page inside loop?Hi esmi,
Your solution has the same result as my first attempt: post #5 dissapears…
I’m gonna try keesiemeijer’s suggestion now, looks promising
Thanks!Forum: Fixing WordPress
In reply to: Change posts_per_page inside loop?Thanks both of you!
My weekend just started so not able to try it out right now…
Will try your suggestions as soon as I can!
ThanksForum: Fixing WordPress
In reply to: Change posts_per_page inside loop?Tried it, but same result as:
if($paged > 1)
Keep them coming ??Forum: Fixing WordPress
In reply to: Change posts_per_page inside loop?Nope, same story… Page 3 doesn’t show up on page 2.
But page/3/ shows the same posts as page 2 now.Forum: Fixing WordPress
In reply to: Change posts_per_page inside loop?Thanks for that, I changed it to:
if($paged) : $maxposts = 4; if ($pageNumber == 2): $offset = 3; endif; else: $maxposts = 3; endif;
And that’s working! But now the pagination is messed up.
I have 8 posts in total. On page 1 the wp_paginate shows that there are 3 pages (which is correct 3+4+1=8), but on page 2 it shows there are only 2 pages. When I try to access page/3/ there’s no post in it…
Any thoughts?Forum: Fixing WordPress
In reply to: Change posts_per_page inside loop?Hi there,
Thanks for your reply! You mean like this:if($paged) : $maxposts = 4; else: $maxposts = 3; endif;
I tried that allready and it works sort of however somehow post nr. 5 dissapears?
Forum: Fixing WordPress
In reply to: Change posts_per_page after first page in custom loopAnyone?
Forum: Fixing WordPress
In reply to: Change posts_per_page after first page in custom loopOeps, sorry!
Here’s my code in pastebin: https://pastebin.com/cam0uzVUForum: Fixing WordPress
In reply to: Author Pages in WP 3.0 Don't Work with "pretty" permalinks, help!I had exactly the same problem and it was driving me mad!
But I can confirm the problem does come from the ‘Custom Post Type UI’ plugin. I had a custom taxonomy called ‘author’ for my blog posts which was screwing up my permalinks. I renamed it to ‘author2’ and voila, everything worked!