163 reputation
116
bio website meredevelopment.co.uk
location United Kingdom
age 36
visits member for 2 years, 11 months
seen Nov 20 at 10:18

I'm a freelance php'ish Wordpress'ish developer...


Oct
3
comment Limit popular posts by days
@10wtaylor Hi, there's reference to it under the first Note in Parameters here: codex.wordpress.org/Template_Tags/get_posts
Sep
25
comment ecommerce plugin with “buy for a friend” feature
For future viewers, I would agree that Shopp might be suitable. The API allows customisation to the extent that the shipping address could be re-purposed to be 'friends delivery address' and additional fields for friend's name and a gift message can be added to the checkout with shopp('checkout','customer-info')
Apr
25
comment How to get the post's parent ID?
+1 for updating your question with more info. I'm still not sure what you mean. If you have a custom post type, and it is set to 'hierarchical' then you can use get_post( $post->post_parent ). If you are using a 'page' for blog posts in the settings, then get_option('page_for_posts') will give you the ID. More info and maybe a code snippet will help us give a better answer.
Mar
29
comment php.ini -Theme-specific settings
Just another thought, you might need to up the post_max_size and upload_max_filesize too. Have a read here: php.net/manual/en/ini.core.php#ini.post-max-size
Mar
29
comment php.ini -Theme-specific settings
No Wordpress has to respect the upload settings too. In the add media boxes it shows the max upload size setting (or at least it used to in recent versions). Here's some codex info on it: codex.wordpress.org/…
Mar
29
comment Limit popular posts by days
The OP will need to use 'suppress_filters' => FALSE in the get_posts arguments I believe. Maybe you can improve your answer with a fuller example?
Jul
31
comment Saving data for different custom posts
Just a little note for anyone having problems with this routine bombing-out, you might need to remember to handle the 'revision' posttype by adding something like: elseif ($post_type == 'revision') {return;} . Works great though!
Jul
26
comment wp_list_pages not showing cpt as I expected
Brilliant mate, thanks for the explanation, and workarounds!
Jul
26
comment Check if post/page has gallery?
Great, I added this to functions.php for re-use: function hasgallery(){global $post;return (strpos($post->post_content,'[gallery') !== false);}
Jun
27
comment CSS not being applied using wp_enqueue_style
Did you see this example Todd? codex.wordpress.org/Function_Reference/… - looks like 'admin_init' is the action to use for registering.
Feb
6
comment How do I include the category next to the title of a post?
That's not quite right, you have this: $getCAT = get_the_category(); $firstCAT = $currentCat[0]->cat_name;<?php if(have_posts()): //etc etc See the 'php' tag in there? That needs to be before the '$getCAT' line, or enclose the first 2 lines in their own php tags like this: <?php $getCAT = get_the_category(); $firstCAT = $currentCat[0]->cat_name; ?> <?php if(have_posts()): ?><?php while(have_posts()): ?><?php the_post(); //etc etc etc ?>
Feb
3
comment Wordpress check if user is logged in from non wordpress page
Hi, I'm new to Stack Exchange in general, so is there a way I can see why a post is voted down? Presumably this didnt work, or did I not include enough info?
Feb
3
comment How to filter 'post_gallery' after all other filters/plugins etc
Ah ok. That's a pain. I'll have to recreate it then I guess, and make the changes in the copied original function. Lets hope the 'post_gallery_output' filter does get adopted soon :) - Thanks a lot for the info!
Feb
2
comment Why does a custom post type need the ''hierarchical' args setting?
Thankyou, this might be useful then. I've read the other post and tried to work out how to set a cpt as a parent but cant. I don't see the parent drop-down anywhere on the 'projects' cpt editing page. Does it matter what my cpt's 'capability_type' is? It was 'post' but I changed it to 'page' and tested, but still no drop-down. I have several 'porjects' posts added so there should be something to be a parent in there. Thanks a lot thus far :)
Feb
2
comment How to filter 'post_gallery' after all other filters/plugins etc
I've added an example of the overwriting I mentioned in the post.
Feb
2
comment How to filter 'post_gallery' after all other filters/plugins etc
Ok, I'll recheck and test, and post back. Thanks!
Feb
1
comment Need post_type_archive_title function but in 'single'
Thanks for the suggestion Stephen, yes I know it seems like i should be able to just enter the name manually, but I wanted this template to work across the board for other CPT's too, I should have said that first. Also your solution is still probably what I'll use because it'll pull out the Label so if that ever changes the breadcrumb will reflect that change.