Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter benwisdom

    (@benwisdom)

    The good folks at Code and More helped me by writing the WordPress plugin described above. You can find the file on my website here.

    There is a minor issue with the plugin, in that it takes a manual unselection and a second save to unselect the default category (Cat_id=1) from the post being saved. But hopefully that will be resolved soon.

    I hope this is helpful.

    Regards,

    Ben W.

    benwisdom

    (@benwisdom)

    I’m having a very interesting time with this issue, because I happened to have had about 200 Post categories and about 400 Link categories. This is due to the old way that link categories and post categories were treated differently. Each post category had roughly two corresponding link categories. Needless to say, I would love to take advantage of the new category arrangement and merge all the categories that correspond to one another, whittling down the total number of categories from 600+ to slightly over 200.

    I just upgraded from WP v2.0.3 to WP v2.2, I was most dismayed to see what happened to my categories. When I tried to reclassify some of the links into post categories, they weren’t available as a choice. When I looked at the available choices for the post categories, though, the link categories were there. This is pretty frustrating, because I have way more posts than I do links, so I’m not about to port all my posts into link categories to get everything organized together.

    I found this forum thread, and tried to take MichaelH’s advice. I created a new link and put it in every single category available. As I picked each link category, I noticed that there were a few top-level post categories available to choose because they had no posts in themselves, just in their “children”. (my post categories are in a hierarchy about three levels deep in some cases). With this done, I created a new post and started to assign it to each category, but I found that the top-level post categories that were available on the “new link” screen were suddenly unavailable on the “new post” screen.

    I went back and deleted the “test” link. I went back to the test post, and for some reason even more categories were missing than before! I deleted the “test” post and started all over again from scratch with a new Test post. With a few exceptions, all of both the link categories and the post categories were available. I also made the new test link, and once again only the link categories are available.

    After all this, I think I can come to a few conclusions:

    – A post category will only be available as a link category if it has no posts already in it. It may have children with posts in them, however.

    – Making the test link with all available link categories before making a test post with all available post categories really messes up what post categories are available somehow.

    – Since I have a lot less work put into my links than in my posts (and since I’m no longer using all those freaking categories as I had originally intended), I’ll probably just extract the information from the links I have into posts and delete the links and the link categories, keeping link my link categories to a minimum in the future.

    That’s my upgrade/link/post/category saga. It’s an extreme case that I hope is helpful to others. If there are any WordPress gurus that have any further insight into some of the things that I tried, I would definitely appreciate it.

    Thanks.

    I love this plugin so much, I would like to understand how to add even more functionality:

    • Is there an easy way to modify this plugin to count posts between two arbitrary dates, instead of just between a day in the past and today? I’d like to use that to show the number of posts in each category on my archived pages for any given month or day.
    • Also, is it possible to count the number of posts in each category for a given author, instead of all posts regardless of author?

    Thanks.

    Forum: Plugins
    In reply to: Custom Buttons
    benwisdom

    (@benwisdom)

    I’ll second 3stripe’s motion, except I usually use “id” instead of “class”, like so:

    <span id=”srn”>Hello, world!</span>

    Is there anybody out there that can help with this?

    That worked! Thanks!

    This is a great plugin. But I was wondering: is there a way that it can be modified so that it doesn’t “echo” the output number of posts asked for, but allows it to be used in a mathematical or logical operation?

    Something like

    <?php $var = count_posts('daily log', '60'); ?>

    or

    <?php if (count_posts('daily log', '60')==0) { ... }; ?>

    I’ve tried to use it this way, and it doesn’t seem to work:

    http://www.sevenrealms.org/?page_id=377

    Here’s where I’m currently using it as it is:

    http://www.sevenrealms.org/?page_id=99
    http://www.sevenrealms.org/?page_id=100

    I would like to be able to be able to change the color of a table cell depending on the number of posts in the category represented by that cell (making 0’s white).

    I could possibly modify it myself (knowing just enough about coding to be dangerous) if I had the right coding resources. If anybody reading this doesn’t happen to have a particular answer, then perhaps you could point me to somewhere on the codex or the web that would show me how to write or modify a plugin that would add this kind of functionality??

    Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)