tbp278
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Preview custom post type postsI’ve still not been able to figure out what’s going on with this.
I’ve taken the code directly out of the plugin (which works) and replaced my code with that but it still doesn’t work. I can only think this is some weird bug that’s probably a one of type affair.
To get around the problem I’ve written in the capability support into the plugin which I needed but wasn’t previously supported.
Forum: Fixing WordPress
In reply to: Preview custom post type postsYeah i had /%category%/%postname%/ originally but I dropped the %category% to see if it helped. Thanks for the heads up on that though, the site will be pretty big so that might have got me in a bit of bother.
I can’t use any permalink structure. Even if I use one of the common settings it stops preview working.
Forum: Fixing WordPress
In reply to: Preview custom post type postsOk so after a bit of poking around I’ve managed to isolate the problem to the rewite rule in the declaration.
'rewrite' => array('slug' => 'press-releases', 'with_front' => true),
If I remove it, with permalinks turned off, then I can see the preview.
I need the slug to read ‘press-releases’ rather than ‘press_releases’ so I’ve tried changing the post type name to ‘press-releases’ so that I don’t have to use the rewrite. Thats all good.
But then as soon as I turn permalinks on it stops working again.
My custom permalink structure is just ‘/%postname%/’ – maybe there’s something wrong with that?
Anyone? Please? It’s the final problem I have before this site can go live ??
Forum: Fixing WordPress
In reply to: Query multiple custom taxonomiesAND ($wpdb->term_taxonomy.term_id = '3' AND wpdb->term_taxonomy.term_id = '13')
doesn’t work ??
Forum: Fixing WordPress
In reply to: Query multiple custom taxonomiesAh – slight problem:
This selects terms with ids of 3 OR 13. I need 3 AND 13.
You’re already my favourite person of the day…don’t let me down now ??
Forum: Fixing WordPress
In reply to: Query multiple custom taxonomies@michaelh You are truly a wonderful individual. An SQL god amongst mere mortals. Thank you!
Forum: Fixing WordPress
In reply to: Query multiple custom taxonomiesSurely there has to be a way to achieve this…
My SQL knowledge isn’t that strong ?? Serves me right for growing up on WP queries I guess.
Forum: Fixing WordPress
In reply to: Query multiple custom taxonomiesThanks!
Should this accept:
$taxonomy = "('artists_tax', 'visibility_tax')";
I need to query one term from one taxonomy, and one term from the other taxonomy. This seems to return nothing if I enter more than one taxonomy.
…Or am I being slow?
Forum: Plugins
In reply to: [Plugin: AS-PDF] need post timestamp on pdfHow did you get this working? I desperately need to use this plugin but just get:
Warning: Cannot modify header information – headers already sent by (output started at /Users/Danny/Documents/Work/Projects/Git/press.git/wordpress/wp-settings.php:204) in /Users/Danny/Documents/Work/Projects/Git/press.git/wordpress/wp-content/plugins/as-pdf/tcpdf/tcpdf.php on line 7125
I’ve tried replacing TC-PDF with the latest version (5.5) but it’s not having it.
Please, if you get this, could you send me a copy of your working plugin?
email danny at dannyblackman.comForum: Fixing WordPress
In reply to: Running custom queries is admin meta boxesYeah i did that too.
I’ve re-written it now to load via ajax. It solves the problem and actually works better in this case.
Didn’t get a fix though, but thanks for your suggestions all the same
Forum: Fixing WordPress
In reply to: Running custom queries is admin meta boxesTried it and it doesn’t make a difference.
I think I need to save the original query which brings back the post data, run my custom query, then re-run the original query.
…Something like that anyway.
Only problem is I can’t figure out how to save the original query – $wp_query is empty before the custom query runs
Forum: Fixing WordPress
In reply to: Running custom queries is admin meta boxesI’ve temporarily got round the problem by running another query directly after the loop has closed which queries the correct post type.
$args = array ( 'post_type' => 'press_releases', ); $media_query = new WP_Query($args);
It’s solved it but it’s pretty ugly. Is there another way to reset the query back to its original state? wp_reset_query seems to have no effect.
Forum: Fixing WordPress
In reply to: Custom post types permalinks 404ooookay, I’m getting closer.
I think the problem lies with the custom post type and custom taxonomy sharing a query_var.
I’ve never really understood qhat query_var does? But i guess it makes sense not to have two variables named the same ??
So at the moment I’ve stripped out all my stuff and just used justin’s example, just with the added custom taxonomy:
function create_my_post_types() { register_post_type( 'super_duper', array( 'labels' => array( 'name' => __( 'Super Dupers' ), 'singular_name' => __( 'Super Duper' ) ), 'public' => true, ) ); register_taxonomy('super_duper', 'super_duper', array('hierarchical' => true, 'label' => 'Super duper stuff', 'show_ui' => false, 'query_var' => 'super_duper_tax', 'rewrite' => array( 'slug' => 'super_duper')) ); }
It seems that its fine to name them the same but if the query_var is the same it 404’s.
Now, i need to get that working with my post types…
Forum: Fixing WordPress
In reply to: Custom post types permalinks 404Yep – i tried copying Justins code exactly, pasted it into my functions.php and…
404 AGAIN! I’m going mad.
Forum: Fixing WordPress
In reply to: Custom post types permalinks 404Ah here’s something weird:
If i register a custom taxonomy with the same name as a custom post type, the options on the taxonomy seems to over ride the options on the post type.
ie. I have a ‘videos’ taxonomy registered like so:
register_taxonomy('videos', array( 'videos'),array( 'hierarchical' => true, 'label' => 'Videos','show_ui' => false,'query_var' => 'videos','rewrite' => array('slug' => 'videos'),'singular_label' => 'Video') );
if i turn the ‘rewrite’ value to false on the custom post type it doesn’t make any difference until I remove the videos taxonomy.
Is this something which I shouldn’t be doing? I do have a pretty complicated reason for naming both custom post types and taxonomy the same (mainly due to auto creation of a taxonomy term when a custom post is added)