135 reputation
8
bio website
location UK
age
visits member for 2 years, 4 months
seen Apr 18 at 15:53

I'm a web developer currently employed with lamontdesign ltd.

I code mostly in PHP, javascript / jQuery and MySQL. I know some Java, can do a little bash scripting & know my way around *nix.

I usually answer questions on here when I have something difficult to think about and need a distraction to give my brain some time to mull it over.

8 Bytes walk into a bar....


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
May
24
comment order posts by meta value on posts page
@RutwickGangurde yeah that would help, but the meta_value column is of type longtext - so regardless of what format I store the date as, MySQL will never treat it as one unless I store it in a column of type date or cast it in the select. what a pain lol... that'll teach me to throw custom fields around willy-nilly
May
24
comment order posts by meta value on posts page
@RutwickGangurde just tried, sorry but same as before. I think you're right though, it must be to do with this custom date being stored as text rather than a date. Just playing with the DB at the moment...
May
24
comment order posts by meta value on posts page
nope, will give it a try if you think it will help
May
11
comment How to programatically set the post title of a CPT on wp-admin
that's prefect, thanks! one other solution I was playing with was a bit of javascript to hide the title & update the value but this is much more elegant. thanks for sharing :)
May
11
comment Automatic excerpts
@Tomas excerpts don't contain images by default. What you want sounds more like a limited content - you could try something like this: bavotasan.com/2009/…
May
11
comment How to programatically set the post title of a CPT on wp-admin
@StephenHarris because I can't label the title field as a 'Question', it would be unclear to the user what to do. As I mentioned in the question, if anyone can tell me how to relabel that then that's what I would use
Mar
30
comment How to add some custom HTML to the edit posts page
that did the job, thanks very much :)
Mar
30
comment Recommend an open source, template driven website builder UI that produces a working WordPress site
I think that it wouldn't be a massive project to build something like this - for instance several hosting providers have automated setup of WP and it's database etc using a simple .cgi script (thinking of heart internet here). With a little customisation of WP's database contents, you would be able to make setup simpler for a non techie which would just be a customised wordpress install with several options set. IMO this would be your best bet, there are numerous other solutions but if none fit the bill, better to build your own.