Zaphod
Forum Replies Created
-
Still a bit lost. Do I add
remove_filter( 'excerpt_more', 'twentyten_auto_excerpt_more' );
to my child functions.php and then add
function twentyten_continue_reading_link() { return ' <a href="'. get_permalink() . '">' . __( '', 'twentyten' ) . '</a>'; }
…. is there anybody out there….
??
Maybe this just can’t be done?
In the above example normal WP rules work fine, my redirection rules being ignored. The /ht/ bit on the last line is wrong but I’m aware of that – that’s not the issue.
Just FYI here’s my .htaccess
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /mysite/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d #RewriteRule . /carcompare/index.php [L] L denotes LAST - i.e. dont' follow any more Rewrite Rules RewriteRule . /mysite/index.php </IfModule> # END WordPress #RewriteRule ^old\.html$ new.html THIS ONE WORKS RewriteRule ^used-cars/([0-9a-zA-Z_-]*)/([0-9a-zA-Z_-]*)$ /used-cars/$1/$2/ RewriteRule ^used-cars/([0-9a-zA-Z_-]*)/([0-9a-zA-Z_-]*)/$ /ht/?make=$1&model=$2
Small update to the above:
RewriteRule ^used-cars/([0-9a-zA-Z_-]*)/([0-9a-zA-Z_-]*)$ /used-cars/$1/$2/ RewriteRule ^used-cars/([0-9a-zA-Z_-]*)/([0-9a-zA-Z_-]*)/$ /ht/?make=$1&model=$2
works to turn
https://localhost/ht/used-cars/ford/fiesta/
into (on server end)
/mypage.php?make=ford&model=fiesta** BUT ** it breaks if I just put
https://localhost/ht/used-cars/ford/
saying
Not FoundThe requested URL /used-cars/ford// was not found on this server.
*note* TWO trailing slashes at the end…One step forward, and two steps back…
Have made a very poor start on this.
Have created a dummy site non-wordpress site on my local machine using a .html file, one or two php files etc.
in the .htaccess file I put
RewriteRule ^used-cars/([0-9a-zA-Z]*)$ /used-cars/$1/ RewriteRule ^used-cars/([0-9a-zA-Z]*)/$ /ht/?make=$1
so if I enter
https://localhost/ht/used-cars/Abjh4/ #URL FOR DEMO ONLY – WON’T WORKit shows up as such in the browser but looks for :
/mypage.php?make=Abjh4
SO AS SUCH, IT WORKS.TWO THINGS.
1) Above example: can’t figure out how to get it to work as follows:
https://localhost/ht/used-cars/ford/fiesta/
to show above url but look for
/mypage.php?make=ford&model=fiesta2)If I add this [two rewrite rules above] to the WordPress .htaccess file after the
# END WordPress
bit, it makes no difference whatsoever.So I need a heads up on how to get a rule that I know works (in one sense) to work with the WP rules and not break anything.
2)
Forum: Plugins
In reply to: Breadcrumbs: Using Menu Title Instead of Page TitleME TOO! Amazing that this seemingly simple change is not available. I was hoping that WP versions 3 would have breadcrumbs built in anyway…
If anyone knows how to hack Yoast breadcrumbs (or any other one) to show this I’d greatly appreciate it!
Emm… not sure… maybe? Checking tags and how they work. ??
Just to be clear, the reason it seems long winded is that I would have to create a custom page / subpage for every single manufacturer (along with each and every model per manufacturer).
So if there were 72 manufacturers who each had 10 models, that’s me creating 720 [essentially blank] pages.
Still, they’d go in the sitemap I guess….
Ok, solved this myself. While I think the SQL is actually fine, the problem is that there were thousands of matches for the inner select, and the servers seemed unable to deal with deleting 10k records with such a query – I think due to memory restrictions. Fair enough.
So I basically rewrote the thing to get all the ids and then output one sql query at a time with each id. Works a treat.
Sorry that query should obviously be:
delete from cc_posts where id in (SELECT post_id FROM cc_posts_detail WHERE referrer_site = "vendor1")
Forum: Fixing WordPress
In reply to: Using my own custom [detailed] query – how to have paging?Sorry – just to be clear
LIMIT 30,10
Means start at row 30, and show 10 results. Not that clear from my above posting.
Forum: Fixing WordPress
In reply to: Using my own custom [detailed] query – how to have paging?Germanny,
Yes I did get a solution – sorry about the delay in replying. Basically I just add (e.g.) a ?page=x at the end of each url. Then I just change the LIMT 0,10 (see the last bit of the sql query above) to whatever suits the page.
I.E. for https://www.mysite.com/page/?page=4
I’d just change the limit to LIMIT 30,10
page=4 so, limit (x-1)*10 – in this case, 30, [no of results to show] in this case ten… so
limit 30,10
if page = 1 or page not specified then limit 0,10
The only other thing you need to do is know how many results you’re going to have so that you know how many pages of results there will be.
E.G. if you had 95 results you’d need 10 pages – 9 of which will have ten results and the last one which has the final five.If you need any further pointers let us know.
Forum: Fixing WordPress
In reply to: My inefficient SQL for custom searches..vtxyzzy & t31os_,
You have both gone well beyond the call of duty here. Thanks so much – I now have exactly what I need. V, that last tip was bang on.
You guys should get an Amazon wishlist going, people could donate a few quid to it!
Many many thanks.
Forum: Fixing WordPress
In reply to: My inefficient SQL for custom searches..The problem is that I’d been using WP’s get_post_custom_values to pull the meta data with the previous query.
How do I get at my new fields from the cc_posts_detail table join above now?!
??