Add to Mixx!

Category Magic on Wordpress


I finally decided to add Category Magic to the Wordpress Plugin Repository. All changes will be be available there and all downloads can be gotten from there. I have a new version coming out when I get some time to finish it that will take it to the next level. I enjoy programming in Php and it’s a joy to see it available to a larger audience.

The plugin is stable and has been working for more than 6 months getting thousands of hits per day on several different servers. It’s had no problems and it’s definitely not a resource hog. I think it’s a good plugin and now more of you can judge it.

You can reach the plugin page on Wordpress here:
Category Magic Plugin

Please comment for any feature requests or bug fixes.


Other Related Posts

  • Category Magic Plugin
  • Expanded Category Magic Thoughts
  • Double Category Post Plugin
  • Why I like to Program WordPress Plugins
  • Need WordPress Plugin Suggestions
  • Upgrade to WordPress 2.3?

  • 41 comments ↓

    #1 MTB on 09.24.07 at 1:19 am

    I like your plugin. Is there a way to disable the random feature and displays the most recent posts in chronological order? Thanks.

    #2 admin on 09.25.07 at 10:00 am

    Thanks a million, I have an error in my readme and now I’ll get it fixed with the next update.

    the function call is this:

    glmcatpost('x','z');

    where x is the category and z is the number of posts. It will display the most recent posts. There are template tags to do the same thing, but this can be put directly in a post(if you’re using wp-exec) or a page.

    #3 MTB on 09.27.07 at 10:19 am

    Thanks, it worked. Is there a way to display the date of the post plus the title using this plugin? That would be fantastic.

    #4 admin on 09.27.07 at 11:29 am

    I think so, I have one update I putting up today or tomorrow to make the plugin 100% 2.3 compatible, unfortunately, that will mean it is not 2.2 and below compatible. Luckily, you can still use the old version.

    After that update is up, I will look at adding the date functionality maybe in the form of an extra function arguments but it will require testing. I don’t want anyone to have to change their template tags just to update the plugin.

    #5 gooch on 09.29.07 at 12:03 am

    Very nice, simple to use. Thanks!

    Do you think you can make these functions be inserted into a post or a page with a button tag? It would be nice to have it available for non-php people.

    Also would be nice to be able add multiple categories. Not just 1 or 2. Maybe modify your “glmcatpost(’x',’z');” so that x can accept comma-delineated category ids.

    #6 admin on 09.29.07 at 11:47 pm

    Good idea, I’ll look at doing it. I think I need to make the tag into a filter, it might take a lot of work, but I like the challenge.

    About multiple categories, I worry that adding too many categories might put too much strain on a server. Programmed the way it is now, adding a third category might greatly increase the load, but I could do some testing when I get some time.

    #7 darrell on 10.03.07 at 5:40 pm

    hi — like what you’re doing, but owuld like a bit more control — i have a couple of sites that do a lot of work around categories — rather than just DISPLAYING all or some posts in a category, i’ve been (pre-2.3) using an old plugin called show_category_posts, whcih helpfully returned an ARRAY of post IDs, given a category specification - what meant i could set up a ‘category loop’ and manipulate each post as i needed before display (in my case i just want to display the excerpts) i imagine it would be ‘trivial’ to add that functionality to your plugin — so that as well as DISPLAYING posts, it would, optionally, not generate code, but simply return an array of posts ids that match the selection criteria?

    #8 darrell on 10.03.07 at 5:52 pm

    oops IGNORE previous comment — what i want is dead easy without needing a plugin. mea culpa!

    get_posts(’category-2′);

    for example!

    #9 joker on 10.11.07 at 6:48 pm

    Usefull thing!
    I’d like to publish the n last posts of ALL categories. Is there a trick to doe so?

    #10 karimun on 10.21.07 at 9:29 pm

    Very nice. One suggestion: to create flexible post listings it would be great to see a kind of offset parameter, so to ignore the first x posts of specified categories. This feature would make your plugin to a precious time and code saver. Thank you.

    #11 Ivo S. G. Reis on 11.04.07 at 2:47 pm

    I have installed the 0.8 version of Category Magic Plugin but I don’t know how to use it.

    You inform that the function call is glmcatpos(’x',’z'), where ‘x’ is the category and ‘z’ is the number of posts (quantity?). Ok.

    Can you better explain the usage of the function (function call example)and if the 0.8 version is compatible with wordpress 2.0.2?

    Sorry, I’m brazilian and my English is not good.

    Thansks in advance!

    #12 Louis on 11.06.07 at 11:54 am

    Ok, Ivo. 0.8 is compatiable with 2.0.2 since it was designed for the 2.0 series. 0.9 will not work.

    here is an example

    [code]< ?php glmcatpost('5','3'); ?> [/code]

    This will display the last 3 posts from category #5. You can find out the category id’s in your dashboard under Manage–Categories

    Another example:
    [code]< ?php glmcatranpost('6','10'); ?>[/code]

    This will display the 10 posts from category #6

    I hope this helps.

    #13 Louis on 11.08.07 at 12:50 am

    Karimum, good idea. I find I never have enough time to incorporae all of the good ideas, but when I get a chance I will look at it.

    Joker:
    You would accomplish that the latest posts. It’s a standard template tag.

    #14 Nate on 01.10.08 at 9:40 pm

    I changed web hosts and now the plugin isn’t working for me. I have deleted and added the file again, deactivated and reactivated to no avail. How do I completely uninstall it, like remove any database entries and then reinstall it?

    When I try to use it now, it just loads the page to the point where it calls glmcatpost(’0′,’10′) and then it’s blank, won’t load anymore.

    Any ideas?

    #15 Nate on 01.10.08 at 9:42 pm

    Sorry, I failed to mention it’s 2.3.2 and here’s a page which has it enabled, you can check the source, it goes to the point where it calls the plugin:

    http://www.youdecide2008.com/t.....est/

    It was working fine until I changed web hosts, transferred all my files and my sql database. It wouldn’t work from then on.

    #16 Nate on 01.11.08 at 7:06 pm

    Never mind, the problem was the php memory on my host. It’s still working great and it’s a fantastic plugin.

    #17 Louis on 01.12.08 at 7:13 pm

    Nice site, Nate.

    You had a couple of good questions, I know you solved your problem, but I will answer them for anyone else interested.

    First off, Category Magic doesn’t insert anything in the database. It only reads the database and uses standard wordpress calls.

    Secondly, if you do have problems, make sure you only use the latest version of the plugin with the latest version of wordpress. The older versions only work with Wordpress 2.2 and below.

    Memory issues always seem to dogg Wordpress just because of hosts that default to 8mb of memory for php scripts. 16mb is enough to get the job done pretty well.

    I am looking into a major rewrite of the plugin to take advantage of the tags in 2.3 and streamline the code. Finding the time seems to be the bottleneck now.

    #18 CF on 01.18.08 at 12:30 am

    Hi Louis! Just love your plugin!

    Is there any chance you might integrate tag functions into it? I would really appreciate a function capable of showing posts that belong to a category X and are also tagged with tag Y.

    It’s really the only thing keeping me from transforming some categories into tags.

    By the way: is there any way I can show infinite posts instead of defining a limited amount?

    #19 Coln on 02.06.08 at 8:48 am

    Thanks for the plugin.

    Is there a way to modify the order of how the posts show up in each category? Is there a hack I can put in the .php doc?

    #20 yosax on 02.07.08 at 3:08 am

    Hi, Louie….
    I’ve using your plugin on one of my site.
    But I’ve found that the code is arranged at the opposite.

    glmdobcat(’x',’z');

    where ‘x’ is the number of post while ‘z’ is the category ID.

    #21 Kev on 02.08.08 at 4:42 am

    I have tried installing the plugin - but I still only get the standard category option on the widget page. The theme I’m using is Mandigo.

    Any ideas?

    Kev

    #22 525 on 02.08.08 at 4:25 pm

    thanks thanks thanks :)

    #23 ctrlshift on 02.09.08 at 8:33 am

    Hi Louie!

    It’s possible to display 5-10 random posts with date+author+# comment (I use the functioncall version, I don’t like widgets…)

    Thanks for your great plugin!

    Regards:
    -ctrlshift-

    #24 Susie on 03.05.08 at 9:28 pm

    Hi there! I am wondering if there is a way to get this plugin to show short excerpts of the listed links? I am just baffled as to how to pull excerpts to my sidebar from different categories…I thought maybe there was something I could tweak here that would do what I wanted? Thanks in advance!

    #25 Paul on 03.10.08 at 6:46 am

    Hey, this plugin is great…saved me a ton of time. Is there any way to have the posts displayed in alphabetical order? Thanks a lot.

    #26 DanGarion on 03.18.08 at 3:50 pm

    Heloo,

    I love your plugin, I’m using it to list restaurant reviews that I make, but there is one feature I’d like to see, or possible like to know how to do. I’d like my links to be alphabetical instead of chronological. Is this possible?

    #27 Michael on 03.24.08 at 6:19 am

    I tried several things without success to achieve what this plugin does so successfully. Thanks!

    #28 pablo on 04.22.08 at 1:17 pm

    Is this plugin prepared for the new 2.5 wordpress version? I am trying to install it here in 2.5 version but I could not figure it out.

    #29 Louis on 04.29.08 at 8:56 am

    Pablo, yes the plugin is 2.5 ready.

    About future updates, I have reworked the code and it’s in testing now. A new version with reworked code is coming out in a week or so as long as the testing goes ok.

    About new features, once the update is finished, I will be incorporating new features into the plugin:

    a) The ability to show the entire post or just exerpts.
    b) better parameter passing
    c) less technical implementation
    d) incorporating random tags

    Most of the changes will come in baby steps, but over the next several months it should be looking good.

    #30 yoichi on 05.06.08 at 11:12 pm

    Hi,

    Thanks for a great plugin. Simple is the best!

    But one question though.
    Is there a hack to display the posted date after the link?

    Thanks

    #31 baron on 05.07.08 at 5:04 pm

    hi there .thanks for plugin:

    Does anybody know if tis script is compatible with Wordpress 2.5.1 ?

    Thanks in advance for any help on this!

    best regards

    #32 Louis on 05.14.08 at 1:26 pm

    baron, it’s 2.5 series compatible so it should be compatible with 2.5.1. I have it running on at least one 2.5.1 blog and it’s doing the job.

    Yoichi, I am trying to find the time to make some adjustments for the 1.0 release and that is something I could add into it.

    If you wanted to hack it, you’d need to do some reprogramming on the inside of it. If you are comfortable with programming, you could look into the code and see how to do it. If you need more help, send me an email at louis@ax697.org.

    #33 Philix on 08.01.08 at 4:28 am

    This is a great plugin

    #34 quickcutters on 08.08.08 at 6:21 pm

    Nice plug in.. Thumbs up.

    #35 PeterL on 08.25.08 at 5:00 pm

    Louis!
    I cannot get the plugin to display within a Page. I am using Exec-Php. Is this the problem, or must one use WP-exec?
    I am using WP 2.6 and nothing displays.
    I am using “glmcatpost(’6′,’20′);”

    Thanks
    Peter

    #36 Louis on 08.25.08 at 7:29 pm

    Not sure about exec-php. You need to make sure that you are making the php call it needs to make by enclosing it in the right tags.

    #37 Shane on 11.06.08 at 12:38 am

    Has the ability to show the entire post or just an excerpt been developed yet? or has anyone managed to hack it in yet?

    I think this is a great plugin that needs expanding I know its probably in the pipeline but I would love an update.

    #38 Mark S. Meritt on 11.24.08 at 8:53 pm

    I’m quite looking forward to using this plugin to pull based on multiple categories at once.

    I’ll second (or third!) Paul and DanGarion, though, in requesting an option for sorting the lists alphabetically by post name. I’d love that!

    #39 Allan Ford on 12.23.08 at 5:26 am

    thank you, nice working…

    #40 Luke on 05.31.09 at 3:39 pm

    Hi Louis, Great plugin… Or at least it should be once I get it working. I’m having the same problem as PeterL above, latest version of everything, Exec-PC is on, but your call isn’t getting replaced… The page actually shows the code to the public. Arrgggh… Fighting with Exec-PC instructions now.

    I would like to suggest, however, that you add the ability to sort from oldest in category first… So a non-changing list would display that only adds new entries to the bottom.

    Thanks again for the plugin, I’m sure the exec-pc issue isn’t your fault.

    #41 Luke on 05.31.09 at 4:02 pm

    Ahh… There it is. Under Settings -> Writing, one must disable “WordPress should correct invalidly nested XHTML automatically” in order to use EXEC-PC, and therefore your plugin too.

    Worked like a charm.

    I hear this is bad for SEO, but until someone can explain to me exactly how, I’m going to leave it turned off to use your plugin.

    Hope this helps others!

    Leave a Comment