[Plugin: Custom Permalinks] trouble with templates (15 posts)

  1. Ovidiu
    Posted 7 years ago #

    works great BUT i.e. as I used the plugin to get rid of the category/ i.e. from http://mysite/category/pictures/2008 I changed to http://mysite/pictures/2008 which worked flawless BUT now it was not using the category.php tempalte anymore but a default tempalte, which looks completely different...

    any solution to this?

    I think either index.php or page.php were used.


  2. michaeltyson
    Posted 7 years ago #

    Oops! That's my bad - it looks like categories weren't working at all. Damn inconsistent query_posts parameters ;)

    Grab version 0.1.1 when it's updated on the site in a few minutes, it should solve your problem. Let me know if it doesn't!

  3. Ovidiu
    Posted 7 years ago #

    works perfect now.
    I tried all kind of plugins to achieve this, I tried those who would strip the category prefix and leave it to me to fix it with redirects, then I tried the urbangiraffe plugins i.e. redirection and advanced permalinks (which btw. might give you some ideas to improve your plugin) but had trouble with those.
    Redirection was a very nice plugin, until the latest major version change, which made it way to unintuitive :-(

    One more thing I am concerned with: would it be hard, to make an option page for your plugin where one could see all current redirections made with your plugin maybe even with a direct link to change those or an mass edit page?

    I am asking because, maybe, one day, because of some incompatibilities I might have to switch off your plugin and I'd kind of like to know what will break then :-) so a list with all changes the plugin made would be awesome.

  4. michaeltyson
    Posted 7 years ago #

    Your wish is my command =)

    See version 0.2, available in a couple of minutes (new page under 'Manage')

  5. Ovidiu
    Posted 7 years ago #

    beautiful :-)

    thx a lot, great plugin :-)

  6. Ovidiu
    Posted 7 years ago #

    ok, one more challenge for you :-)

    I'll give you a live example:

    I have got my personal blog here: http://pacura.ru and I display the latest posts on the front page, but only from the category: blog, all other categories contain only pictures. so this view: http://pacura.ru/blog/ and http://pacura.ru/category/blog/ look horrible. I'd like to redirect them both to the main blog page, as there is exactly the same content on these 3 urls and the last two are not even formated nicely.

    BUT I can't do it with your plugin because if I leave the custom permalink blank, it doesn't change it :-)

  7. Ovidiu
    Posted 7 years ago #

    another issue, maybe you can help me out. I am using the robots meta plugin from here: http://wordpress.org/extend/plugins/robots-meta/ and there is one setting which is causing me trouble:

    Permalink settings: Enforce a trailing slash on all category and tag URL's
    If you choose a permalink for your posts with .html, or anything else but a / on the end, this will force WordPress to add a trailing slash to non-post pages nonetheless.

    So if I check this and use a custom permalink without a trailing slash all works fine, if I enter my custom permalink with a trailing slash, I get a 404 error (talking about categories here) you can check here: http://pacura.ru/pictures/
    I am currently updating my custom permalinks for all my categories, all should work, but I'll leave the last one: '2003 - 07 - Journey to Romania' with a trailing slash so you can see the 404 error.

    My permalink is set to: /%category%/%postname%/

    can you give me some advice as to how to adjust my settings? why should I enter the custom permalink without slash if it gets added by another plugin anyway? what settings would you recommend?

  8. michaeltyson
    Posted 7 years ago #

    Your first question: That's not really something that this plugin is designed to handle. You want redirection, and the best way to do that is to create a .htaccess in your webroot and put something like this into it:

    Redirect 301 /blog http://pacura.ru/

    Your second question: Ah yes - that's mostly my bad, there. I was stripping out leading/trailing slashes entirely, thereby never matching a permalink if the permalink had trailing slashes.

    Version 0.2.1 should work now.

  9. Ovidiu
    Posted 7 years ago #

    thx :-)

    #2 works perfect
    #1, well, I know I could redirect it, but the fact remains that I can't change the permalink to be the root blog itsself. No problem, I can use the redirect you suggested, I know.

    thx a million for this useful plugin.

  10. Ovidiu
    Posted 7 years ago #

    thx for fixing the trailing slashes probs, I went mad searching for the culprit that broke my pagination :-)

  11. Ovidiu
    Posted 7 years ago #

    hey there :-0

    one more request: will you update this plugin to work with wp 2.7?
    I have a couple of sites where I already switched to beta3 and later :-)

  12. Ovidiu
    Posted 7 years ago #

    just to let you know, your 0.3.2 version in conunction with wp 2.7.beta3-9791 gives this error on category pages:

    Catchable fatal error: Object of class WP_Error could not be converted to string in /var/www/web6/web/wp-content/plugins/custom-permalinks/custom-permalinks.php on line 550

  13. michaeltyson
    Posted 7 years ago #

    Sorry about the delay in getting back to you, Ovidiu! Is there a way to get email notifications for WP forum posts? I keep forgetting to check ;)

    As I mentioned on the plugin page, I will definitely be supporting 2.7, and will get onto it soon.

  14. Ovidiu
    Posted 7 years ago #

    thx, I'll wait for 2.7 support.
    as to email notification, I haven't found that yet, but yo ucan follow a rss feed of your profile :-)

  15. emersonf
    Posted 7 years ago #

    I sent this to Michael as well, but thought someone might see this and have an idea. I hope he'll forgive a bit of copy and editing from the question in my email.

    It looks like publishing a post under a category breaks the permalink functionality (using 2.7).

    In our case, we have a hierarchy of categories; e.g., 'meta - Hide quoted text -category', then under it 'sub category a', 'sub category b' and 'sub category c'. The intent being to use those as templating criteria. And it almost works, except that posts we make under the 'meta category' category show an odd issue.

    Instead of redirecting to the correct post if one visits a permalink, instead it'll just show the most recent post under 'meta category'. So if I made three posts under the 'meta category', 'post 1', 'post 2' and 'post 3' in that order, it would load 'post 3' when I went to the permalinks of 'post 1' and 'post 2'.

    The main issue, I suspect, is that we're using wordpress 2.7. But I was hoping someone might have some other ideas about what could be causing it.

Topic Closed

This topic has been closed to new replies.

About this Topic