188 reputation
14
bio website
location UK
age
visits member for 3 years, 5 months
seen 15 hours ago

Just another SE user. I like asking questions, posting answers, and writing comments. Sometimes I vote.


Jan
26
comment How does wordpress name resized image copies?
I actually ended up doing as suggested and connecting to the database to get a list of guids. It's the only way to go really, although having tested the regex approach it worked fine unless someone uploaded pic-100x100.jpg.
Jan
21
comment How does wordpress name resized image copies?
thanks for confirming that - you are right about it being imperfect to base my regex on. And yes in this instance searching the wordpress DB would be a big PITA but for a correct result then it's worth it. Thanks for the thoughtful comments.
Oct
7
comment Gallery Shortcode: using link attribute to link to a specific image size
+1. even 3 years later, and after the recent gallery revamps, this is still an issue - especially if you use a lightbox in conjunction with the wordpress gallery. there needs to be a size option here to stop users having to download 4 meg images to view in a 800x600 lightbox...
Sep
12
comment one time popup after theme activation
apologies for the chat link, I tried to move this into chat and haven't been able to log in, I didn't mean to wipe the rest of the comments. as I've said, my question is how to use a modal box after theme activation. It's in the title. Again if you think my question can be any clearer please edit or suggest an edit. Don't worry about helping, I'll work it out. Thanks all the same.
Jul
28
comment Enable revisions for custom post type
Something to consider - the Revisions box won't appear after enabling Revisions on your CPT unless you make some changes and save a few times first. This threw me, I thought my code wasn't working but (of course) there were no revisions to display.
Jul
28
comment How to let contributors to create a new revision(draft) editing their published posts
I'm not certain but I think the line if ($data['post_status'] = "publish"){ should read if ($data['post_status'] == "publish"){ - otherwise it's not testing it's assigning. Can you update your answer if I'm right?
Jul
7
comment How can you check if you are in a particular page in the WP Admin section? For example how can I check if I am in the Users > Your Profile page?
+1 for using built-ins, this helped me
May
5
comment Hide certain pages / posts on wp-admin, show custom filter
this did the trick, I based my solution on this and then used another hook to add a filter link to the wp-admin page, with a GET param that I tested against. Thanks!
Nov
20
comment Change type of permalinks on TinyMCE link dialogue
Ah I didn't realise that it took care of that - that's brilliant :) thanks!
Feb
22
comment register_nav_menus, then create menus programatically
if you know of an easier / simpler way to acheive that I'm definitely all ears :)
Feb
22
comment register_nav_menus, then create menus programatically
Because when I make a WP site, most of the time I want a specific set of top-level pages in the nav menu (not all of them). This means install wp -> install theme -> add some example pages -> add menus, which is inefficient when you do it 10 times. It would be a time-saver to auto-generate the menu on theme install, then make appropriate edits later. The other side of the coin is that the theme is used by some of my collegues and I often have to go in and create the main nav menu for them; they don't realise it needs to be created each time.
Feb
22
comment register_nav_menus, then create menus programatically
great answer, and very useful info - but I still do want to create the menus themselves programatically. I know I don't have to but whenever I install my theme the first thing I do is create the main nav menu as 99% of the time it is always a custom menu. Your point about wp_nav_menu falling back is good to know though :)
Nov
23
comment the_post_thumbnail('my_image_size') always outputs full image
it was the thumbnails, I must have added the image size after putting the images up. what an idiot I am lol. someone put that in an answer and I'll accept.
Nov
23
comment the_post_thumbnail('my_image_size') always outputs full image
not my theme, but couldn't speak for all plugins. I have none installed that do anything with media, but you never know. regenerating thumbnails at the moment
Nov
23
comment the_post_thumbnail('my_image_size') always outputs full image
yeah I uploaded the images after writing that part of the theme - I think. To be sure I'll regenerate them again now though, that might be it.
Jun
10
comment gallery shortcode exclude not working
good suggestions but didn't help. I wasn't using include at all, just what I posted. I think something was not quite right with that particular theme or install of WP, because I tried this on another WP site and it worked as expected. Havent figured out what went wrong though.
Jun
8
comment gallery shortcode exclude not working
yep, just checked the database. the entry in the posts table that is my featured image has ID 93.
Jun
8
comment gallery shortcode exclude not working
not completely, could be wrong. How I find the id is like this: $featuredId=get_post_thumbnail_id();. When I echo that I get 93. But now you've said that, I'm going to see if I can find out if that's right
May
25
comment order posts by meta value on posts page
@m0r7if3r that is certainly another option, however it gives birth to another question - how to change the meta value (i.e running str_to_time() on it) before it's saved on wp-admin. And the effect is still the same - I'm going to require another query regardless, the only difference is that I can use query_posts() instead of writing the SQL myself. If you have a better way, feel free to post an answer and if it's good I'll gladly accept it over my own
May
24
comment order posts by meta value on posts page
@m0r7if3r yes, the field is filled out with a js datepicker and having a unix timestamp might be confusing to the user even if they don't need to set it by hand. however, I've tried it and it's another solution to this problem: sqlfiddle.com/#!2/d77da/3