nearlythere
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: permalink, how to separate posts from pages.i guess i shoulda made it clear-er at the start:
since i’m using Pages too… and i would like pages to appear outside of ‘portfolio’ … i can’t put the entire wordpress in a /portfolio/ directory…
but ouch. i just tried it anyway (and updated my permalink structure accordingly) and no links worked at all. … and the Pages were placed in the portfolio dir.
Forum: Fixing WordPress
In reply to: is ‘www.mydomain.com/ categoryname/’ possible?DOH! I completely didn’t even notice the date.
My bad. sorry about that, TechGnome.
-h
Forum: Fixing WordPress
In reply to: is ‘www.mydomain.com/ categoryname/’ possible?had you tried this fix to remove the word ‘category’?
from aleck: https://www.ads-software.com/support/topic.php?id=18304#post-141363
“
To remove the word “category” in category permalinks, you need to change the following line in wp-includes/classes.php:$this->category_structure = $this->front . 'category/';
into this:
$this->category_structure = $this->front;
This is in get_category_permastruct() method. WP’s mod-rewrite rules already cover URL’s like this, so no problems there. I’m building the theme for my blog and this works great so far. I’ll report if I encounter problems with it. ” – from aleck
Forum: Fixing WordPress
In reply to: Permalinks Broken in 1.5I have tried both the Ungreedy and the Reduced rewrite plugins,
https://boren.nu/archives/2005/03/07/reduced-rewrite-plugin/
https://boren.nu/archives/2005/03/08/ungreedy-rewrite-plugin/… and they have not worked to make /%category%/ work as part of the permalink structure on Apache 1.3.x
Can someone confirm for me that getting this to work is nigh impossible? I feel as though I’ve wasted alot of time on trying to get WP to work to do this, with false hopes.
I just want someone to say “forget it!”
Else, can someone how me an example of this working, and details of the environment in which this works?
Forum: Fixing WordPress
In reply to: Category Permalinksi would add it to codex, if it worked.
as far as i’m concerned the category tag is brokened. and this hack is broken. you have to manually update the .htaccess everytime you add in a new ‘page’. if you use that feature, this is a tragedy. oh, and sub-categories don’t work with this either.
but it is all written step-by-step here:
https://www.aplus.co.yu/it/this-blog-runs-wp-15-now/Forum: Fixing WordPress
In reply to: WP 1.5 sub-categories displaying under categories ?it looks like chuckblue fixed the problem… i see the use of “<ul class=’children’>” in his website…
how’d you do it?
if you really did discover a bug… did anyone submit this to mosquito, the bug tracker for wordpress…
Forum: Fixing WordPress
In reply to: Category Permalinkssorry, wait a second, why did you edit your classes file? that is for removing the word ‘category’ but you’re not using the category for your permalinks, are you?
can you send a link?
Forum: Fixing WordPress
In reply to: Category Permalinksso you have all other archives, but no single entry for post?
if you are letting wordpress write your htaccess file, and you had other .htaccess settings before- delete your .htaccess file and go back into permalink settings and copy and paste it into new htaccess file.
i noticed mine was getting mad garbled and had to start fresh.
there’s a serious bug in writing the htaccess, apparently.
Forum: Fixing WordPress
In reply to: Category PermalinksThat does, thanks.
Now I’ve found that if you use the ‘page feature’ you have to manually edit the .htaccess each time.. remembering to move the category lines down to bottom.
I think I’m about to abandon this hack altogether… ??
Forum: Fixing WordPress
In reply to: URL: /?tegory%/%postname%/And another bummer is, if you’re using the page feature, you have to manually update your .htaccess each time. Bah!
Forum: Themes and Templates
In reply to: Category Specific Templatesi’m working on something similiar, and i’m finding that if you don’t have sub-categories, and only one category per entry- you’re OK.
so- i was using a modified version of the code listed here:
https://www.ads-software.com/support/topic.php?id=20048#post-114255and i placed this in my header.php where page begins, to tell me what category it was.
Is this a category?
<?php
switch($cat) {
case "1":
print "this is under cat1";
break;
case "2":
print "this is under cat2";
break;
case "3":
print "this is under cat3";
break;
case "4":
print "this is under cat4";
break;
default:
print "default";
break;
}
?>and what I discovered is:
– single entries will display the the category they are listed under.
– and top-level categories will display the same number– but when you have sub-categories, they list themselves in the top-level category.
for example:
portfolio (returns it’s ID as cat2)
– books (returns parent ID cat2 as but it is category 3)
– – Individual entry, (returns parent ID cat3)what i need is:
portfolio (return cat2)
– books (return it’s own ID cat3)
– – Individual entry, (returns parent ID cat3)so as long as you have a one-level hierarchy it’s OK.
but this isn’t OK for me. :o(
Forum: Fixing WordPress
In reply to: URL: /?tegory%/%postname%/aleck made a tutorial on this subject.
1. You need to hack wp-includes/classes.php to remove the word ‘category’
2. You need to change the permalink structure in the wp admin area to /%category%/%postname%/
3. You need to manually edit the .htaccess, because there is a bug aleck found in the way WP edits the .htaccess file.
All incredible amazing details here:
https://www.aplus.co.yu/it/this-blog-runs-wp-15-now/THE ONLY BUMMER is that it apparently is not friendly with sub-categories… and the sub-category archives do not work- you get a Wp 404 error.
Forum: Fixing WordPress
In reply to: Category Permalinksok, let me pick up where i left off!! I had moved some lines, and tested the site, but it appeared not to work. i fact it was working, but only if you don’t have sub-categories. (the sub-category pages return a WP 404 file not found error).
so if we pick up at number 4 above, i moved these lines:
RewriteRule ^(.+)/feed/(feed|rdf|rss|rss2|atom)/?$ /index.php?category_name=$1&feed=$2 [QSA,L]
RewriteRule ^(.+)/(feed|rdf|rss|rss2|atom)/?$ /index.php?category_name=$1&feed=$2 [QSA,L]
RewriteRule ^(.+)/page/?([0-9]{1,})/?$ /index.php?category_name=$1&paged=$2 [QSA,L]
RewriteRule ^(.+)/?$ /index.php?category_name=$1 [QSA,L]to the bottom, above, the final closing of </IfModule>
So it works… but only if you don’t have sub-categories.
at this point, this means i can see these links to single entries:
https://site.kidsown.ie/portfolio/projects/unheard-voices/and i can see this archive page:
https://site.kidsown.ie/portfolio/but i can’t see the sub-category archive page:
https://site.kidsown.ie/portfolio/projects/any advice on this past hurdle, and i think we’ll have ourselves a tidy little fix here. i’d be glad to post it on the wiki, and write it up.
Forum: Fixing WordPress
In reply to: Category Permalinksaleck! you’re a star. i’m going to try this right now. LOL, i had just given up on the entire subject, and so i have to start from scratch now. i’ll take notes as i go, this should be added as a ‘how-to guide.’
1- edit wp-includes/classes.php
$this->category_structure = $this->front . 'category/';
into this:
$this->category_structure = $this->front;
2- edit permalink structure in wordpress admin area; options > permalinks.
structure: /%category%/%postname%/
3- click ‘update permalink structure’. page reloads. do not allow WP to edit your .htaccess. instead, update your .htaccess manually. copy and paste rewrite rules. into text document from bottom of permalinks page in WP admin area.
4- look for category rules, and move them to the end of the WP section.
ok! this is where i’m stumped, i don’t see any ‘category rules’… can you give me an example of what the group of category rules might look like? (is this because i did the modification to the classes file- should i not do this?)
if you can bear it, here is what WP spit out for my .htaccess (i had to go in, and overwrite the old one, since it was getting seriously messed up with mad duplication.) which lines should be moved?
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ – [S=45]
RewriteRule ^(about-us/team-members)/feed/(feed|rdf|rss|rss2|atom)/?$ /index.php?pagename=$1&feed=$2 [QSA,L]
RewriteRule ^(about-us/team-members)/(feed|rdf|rss|rss2|atom)/?$ /index.php?pagename=$1&feed=$2 [QSA,L]
RewriteRule ^(about-us/team-members)/page/?([0-9]{1,})/?$ /index.php?pagename=$1&paged=$2 [QSA,L]
RewriteRule ^(about-us/team-members)/?([0-9]+)?/?$ /index.php?pagename=$1&page=$2 [QSA,L]
RewriteRule ^(about-us/team-members)/trackback/?$ /index.php?pagename=$1&tb=1 [QSA,L]
RewriteRule ^(about-us)/feed/(feed|rdf|rss|rss2|atom)/?$ /index.php?pagename=$1&feed=$2 [QSA,L]
RewriteRule ^(about-us)/(feed|rdf|rss|rss2|atom)/?$ /index.php?pagename=$1&feed=$2 [QSA,L]
RewriteRule ^(about-us)/page/?([0-9]{1,})/?$ /index.php?pagename=$1&paged=$2 [QSA,L]
RewriteRule ^(about-us)/?([0-9]+)?/?$ /index.php?pagename=$1&page=$2 [QSA,L]
RewriteRule ^(about-us)/trackback/?$ /index.php?pagename=$1&tb=1 [QSA,L]
RewriteRule ^feed/(feed|rdf|rss|rss2|atom)/?$ /index.php?&feed=$1 [QSA,L]
RewriteRule ^(feed|rdf|rss|rss2|atom)/?$ /index.php?&feed=$1 [QSA,L]
RewriteRule ^page/?([0-9]{1,})/?$ /index.php?&paged=$1 [QSA,L]
RewriteRule ^comments/feed/(feed|rdf|rss|rss2|atom)/?$ /index.php?&feed=$1&withcomments=1 [QSA,L]
RewriteRule ^comments/(feed|rdf|rss|rss2|atom)/?$ /index.php?&feed=$1&withcomments=1 [QSA,L]
RewriteRule ^comments/page/?([0-9]{1,})/?$ /index.php?&paged=$1 [QSA,L]
RewriteRule ^search/(.+)/feed/(feed|rdf|rss|rss2|atom)/?$ /index.php?s=$1&feed=$2 [QSA,L]
RewriteRule ^search/(.+)/(feed|rdf|rss|rss2|atom)/?$ /index.php?s=$1&feed=$2 [QSA,L]
RewriteRule ^search/(.+)/page/?([0-9]{1,})/?$ /index.php?s=$1&paged=$2 [QSA,L]
RewriteRule ^search/(.+)/?$ /index.php?s=$1 [QSA,L]
RewriteRule ^(.+)/feed/(feed|rdf|rss|rss2|atom)/?$ /index.php?category_name=$1&feed=$2 [QSA,L]
RewriteRule ^(.+)/(feed|rdf|rss|rss2|atom)/?$ /index.php?category_name=$1&feed=$2 [QSA,L]
RewriteRule ^(.+)/page/?([0-9]{1,})/?$ /index.php?category_name=$1&paged=$2 [QSA,L]
RewriteRule ^(.+)/?$ /index.php?category_name=$1 [QSA,L]
RewriteRule ^author/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$ /index.php?author_name=$1&feed=$2 [QSA,L]
RewriteRule ^author/([^/]+)/(feed|rdf|rss|rss2|atom)/?$ /index.php?author_name=$1&feed=$2 [QSA,L]
RewriteRule ^author/([^/]+)/page/?([0-9]{1,})/?$ /index.php?author_name=$1&paged=$2 [QSA,L]
RewriteRule ^author/([^/]+)/?$ /index.php?author_name=$1 [QSA,L]
RewriteRule ^([0-9]{4})/feed/(feed|rdf|rss|rss2|atom)/?$ /index.php?year=$1&feed=$2 [QSA,L]
RewriteRule ^([0-9]{4})/(feed|rdf|rss|rss2|atom)/?$ /index.php?year=$1&feed=$2 [QSA,L]
RewriteRule ^([0-9]{4})/page/?([0-9]{1,})/?$ /index.php?year=$1&paged=$2 [QSA,L]
RewriteRule ^([0-9]{4})/?$ /index.php?year=$1 [QSA,L]
RewriteRule ^([0-9]{4})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$ /index.php?year=$1&monthnum=$2&feed=$3 [QSA,L]
RewriteRule ^([0-9]{4})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$ /index.php?year=$1&monthnum=$2&feed=$3 [QSA,L]
RewriteRule ^([0-9]{4})/([0-9]{1,2})/page/?([0-9]{1,})/?$ /index.php?year=$1&monthnum=$2&paged=$3 [QSA,L]
RewriteRule ^([0-9]{4})/([0-9]{1,2})/?$ /index.php?year=$1&monthnum=$2 [QSA,L]
RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$ /index.php?year=$1&monthnum=$2&day=$3&feed=$4 [QSA,L]
RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$ /index.php?year=$1&monthnum=$2&day=$3&feed=$4 [QSA,L]
RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/page/?([0-9]{1,})/?$ /index.php?year=$1&monthnum=$2&day=$3&paged=$4 [QSA,L]
RewriteRule ^([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$ /index.php?year=$1&monthnum=$2&day=$3 [QSA,L]
RewriteRule ^(.+)/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$ /index.php?category_name=$1&name=$2&feed=$3 [QSA,L]
RewriteRule ^(.+)/([^/]+)/(feed|rdf|rss|rss2|atom)/?$ /index.php?category_name=$1&name=$2&feed=$3 [QSA,L]
RewriteRule ^(.+)/([^/]+)/page/?([0-9]{1,})/?$ /index.php?category_name=$1&name=$2&paged=$3 [QSA,L]
RewriteRule ^(.+)/([^/]+)/?([0-9]+)?/?$ /index.php?category_name=$1&name=$2&page=$3 [QSA,L]
RewriteRule ^(.+)/([^/]+)/trackback/?$ /index.php?category_name=$1&name=$2&tb=1 [QSA,L]
</IfModule>Forum: Themes and Templates
In reply to: Some help with a code snippet?i’m new to WP, so i won’t be much help to you but i feel bad for you. so i gave the code above a go.
this piece of code appears to be hard-wiring to show the children of a particular page, and if you put it in the side-bar it will appear on all pages.
<?php wp_list_pages(‘child_of=3&title_li=<h2>’ . __(‘Pages’) . ‘</h2>’ ); ?>this piece put out nothing for me at all, but i can see that it is checking if the current page is ‘home’.
<?php if($wp_query->is_page && !is_home()) {
$lp_param = “”;
$lp_param = “title_li=&depth=1&child_of=” .
$wp_query->get_queried_object_id();
wp_list_pages($lp_param);
}
?>so i did a search for keywords, child parent page and came up with these posts, which i will dig into now… i’ll get back to you if i can finger something out.
https://www.ads-software.com/support/topic.php?id=24230#post-139411
https://www.ads-software.com/support/topic.php?id=24230#post-136812
https://www.ads-software.com/support/topic.php?id=25207#post-141907
in terms of getting feedback- i’ve noticed we might get better response by giving our posts keyworded titles like ‘Show only child pages’ or something like that. Since the forums only list *so very few* recent posts on the first page- only the last few hours show up. So you might get more response by people searching for same topic, and that’s where the title is important!
-h