WordPress.org

Ready to get started?Download WordPress

Forums

Where is the category redirect generated for click (7 posts)

  1. ccheaton
    Member
    Posted 9 years ago #

    I'm interested in knowing how I can change the redirect of categories to a page other than index.php. I have slightly different needs, in terms of formatting, for my archives page, so I would like for all clicks on a category name to jump to archives.php?cat=2, for example, instead of index.php?cat=2.
    That way, I can have specific formatting on my archives.php page. Is there an easy way to change this?
    Has this question been asked 10,000 times before? ;) (Honestly, I just spent about 2 hours looking for an answer on these forums, and didn't find one...maybe I'm searching for the wrong terms.)

  2. charle97
    Member
    Posted 9 years ago #

    you'll need to edit the function you're using to spit out the categories and hardcode archives.php.

  3. Beel
    Member
    Posted 9 years ago #

    Well, I would assume you would need to either hack template-functions-general or do a redirect with htaccess. But you can still do a formatting change in the css for archives listings. Anyway, if you want to hack - index.php is called by get_settings('blogfilename') so you would need to change that to archives.php in the appropriate places.

  4. ccheaton
    Member
    Posted 9 years ago #

    Hmm... The idea of doing it via the .css is intriguing, but I'm not sure I'm quite the .css master to handle that. For example, if I only want the archive navigation tools (calendar, list of archived categories, etc...) listed on the archives 'page,' how would I go about that? Also, I am currently using javascript to power a navigation menu at the top of the page -- it supplies the functions for the rollover images.
    Perhaps I just need a push in the right direction here - I started developing this site about a month ago, and I don't mind making major changes, I just don't want to lose the functionality that I currently have. However, I'm aware that the news archives structure will have to change. You can see the site here:
    http://www.publichealthcenter.com
    Let me know if you have ideas about how to best approach it. I want to maintain a 'Main Page' that just has the x number of recent links that I set in the admin page. I would also like for the archives, if possible, to retain the little rollover images that are currently on the archives pages, as I like the aesthetic. Otherwise, I'm open to pretty much any other changes (and to changing these, too, though I'd prefer not to).

  5. Root
    Member
    Posted 9 years ago #

    Well this may not help, but on the specific point of the javascript rollovers they can be implemented in css as well. No problem there. On the grounds of accessibility I think many web standards authors would want to steer you away from javascript any where near the nav functions even if the effects are purely visual. CSS can do that, no question about it.
    Your other stuff is going to need php and the two posts above seem very helpful.
    I am sure a similar question has been asked on this forum before, but about restyling by categories not archives. The dynamics are very similar.

  6. ccheaton
    Member
    Posted 9 years ago #

    Beel, I took your suggestion and just flip-flopped the site. I'm not entirely happy with it, but that's largely because of my pathetic .css skills. I have a really hard time placing things horizontally across a page.
    Anyhow, a few things I noticed along the way:
    * IE stinks with .css layout. Half of the time it just doesn't load the background colors. Firefox always gets this right.
    * Firefox does not consider the floating menu to be inside of the wrap (or Frame, as I have it called on the site). IE gets this right.
    * I don't quite get the point of the excerpt field when one can just use the More tag. When I set up the main page to use an excerpt, I expected to see the full article when I clicked on the title. No such luck - all I saw was that article, on its own page, with just the excerpt displayed.
    * I am a perfectionist, and there are about 10k things bothering me about the code and the site. I'm going to switch the navigation menu over to .css sometime this week, but it's doing fine for now. ;)

  7. ccheaton
    Member
    Posted 9 years ago #

    Looking into the IE problem, it looks like it is well documented here:
    http://www.positioniseverything.net/explorer/peekaboo.html
    and here:
    http://www.positioniseverything.net/explorer/threepxtest.html
    But my implementation of their fixes don't work if I use them on something that wraps everything after the float, and it causes the entire area of the menu to be made into a margin when used on just the article.
    You can see the difference if you use IE 6 and look first here:
    http://www.publichealthcenter.com/archives/index.php
    That's when I just use it on each individual article. And here:
    http://www.publichealthcenter.com/archives/index2.php
    which is when I use it on an object that wraps the entire contents, including the float and the articles next to it and below. In that case, the wrap is correct, but the background colors are not displayed appropriately.
    Note: this is not a problem in Mozilla/Firefox.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.