• I’m having all kinds of trouble creating a manual link within my template files to a specific category. I don’t have permalinks running yet, so how would I create a link to, say, category 17 from within a sentence like:

    For more information on <a href="cat=17.php">Cat17</a>.

Viewing 9 replies - 1 through 9 (of 9 total)
  • I did a couple links this way on my sidebar. I put:

    <a href="http://blog.moltenwords.net/index.php?cat=8">
    stuff</a>

    I’m having the exact same problem. My category and page links in index.php do not include “index.php?whatever” like they should, they instead read “mydomain.com/?whatever”

    It’s a default installation, btw.

    Thread Starter Lorelle

    (@lorelle)

    My links that don’t include index.php as part of the address “work” but the totally bork on validation, setting off PHP session errors. Since a link shouldn’t call any PHP code, except that it is looking for a php file…I’m confused. Anyone know how to link to a category without permalinks?

    Is it with the index.php in the title? Well, I just tried it as listed above and it doesn’t work. Page not found and a lot of PHP session errors.

    Oriecat, do you have yours with the absolute link like that or relative? I really would like to try to relative link, but if I can’t….Have you run validation on your pages without any PHP session errors?

    Another idea?

    Thread Starter Lorelle

    (@lorelle)

    Well, it finally worked without errors. I do have to have the absolute reference. From the http all the way through. #$%&*!!

    Has anyone found a work around for this?

    Thread Starter Lorelle

    (@lorelle)

    bump

    Thread Starter Lorelle

    (@lorelle)

    bump

    Why aren’t permalinks being used in teh first place? I’ll be honest I didn’t have permalinks when I was linking stuff, but all I did was use relative rather than absolute links – i think, or I may not have, I did something and it was working, and then I realised that I didn’t have permalinks on so set them and they still work.

    Not sure what to say.

    On a side note Lorelle, how are your files set up for individual categories? Is it a case of several templates, several css files and several headers and sidebars or have you done something else? You said it was realtively easy to do all this, and I’ve actually found it is, ok I have 6 category php files, 6 css and 6 header files and will possibly have 6 sidebar files but it all works in the end right? I assume there’s a way to use a single css file to create every style for each template, but I couldn’t figure it out and I don’t think anyone here is quite sure either!

    Thread Starter Lorelle

    (@lorelle)

    Permalinks aren’t on yet because the site isn’t public and last time I turned them on, I screwed up the entire site with the changes in the htaccess file. They will be on soon, but until then, I have THOUSANDS, and I mean that number, of links to my different categories within my site that I want to start replacing before the site goes public. Even with the permalinks turned on, wouldn’t the link via ID work?

    Thread Starter Lorelle

    (@lorelle)

    As for the categories, this has been discussed elsewhere and I have tons set up, and a couple of sidebars and such. Check out:
    http://boren.nu/downloads/custom_post_templates.phps
    http://wordpress.org/support/topic.php?id=27073
    and…I can’t find the other link but it talked about adding all the category pages…you participated I think.

    As for creating a single style for multiple templates – in a way it can’t be done. Unless the css references in the multiple templates is “different” like content-1, content-2 (which I know is being done with some things like identifying the post as post-ID#), changing the look through the use of one stylesheet without changing the templates is pretty challenging. An if/else statement would have to be created that generated EVERY tag or at least the body, rap, or whatever is the parent tag above all parents be changed based upon whatever IF there was in the statement.

    I still need the answer for my question, but yes, if an if/else statement was set for the, say, #rap tag that generated a unique number, the stylesheet could feature styles that changed the look under the #rap-1, #rap-2 and so on styles. Painful, but could work. So a link would be #rap-23 a:link {styles} and a link in the sidebar of 23 would be #rap-23 #sidebar a:link {styles} and so on. Can be done but be VERY careful.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘How to link to a category’ is closed to new replies.