18,073 reputation
31858
bio website tomjn.com
location United Kingdom
age 26
visits member for 4 years, 9 months
seen yesterday

I’m a VIP Wrangler at Automattic, a former Code For The People developer, a speaker at conferences, and an elected community moderator at WordPress Stack Exchange.

I also blog about WordPress and PHP at http://tomjn.com


1d
comment How to track your theme usage on the internet?
You will need to make this opt in, if you add something that phones home for marketing purpose you may very well be running foul of data protection laws in a number of countries
2d
comment how to find duplicated permalinks?
So your question is actually about slugs not permalinks?
2d
revised Creating a Link Text like Submit Button in Admin Page
added 2 characters in body
2d
comment How Do I get the author's page id?
Specifically, they are archives that list posts, e.g. posts of type 'page'. Archives are just lists, hence asking for their post ID is a nonsensical question once you understand how they work. However, you could ask for the authors User ID, and store data in the users meta, but you can't comment on an archive or a user themselves
2d
comment What are all the available parameters for query_posts?
You should never use query_posts, it is bad practice, use WP_Query or the pre_get_posts filter instead
2d
comment Shortcode in a blog post, footer and related products stop working
wp_reset_query should only be called when using query_posts, which is a function that should never be used. If you use query_posts you should switch to WP_Query or using the pre_get_posts filter. Then, you'd use wp_reset_postdata to clean up
2d
comment Managing many pages on a WordPress website
What do you mean by re-arrange? Changing parent and children pages? Setting menu order? Dates?
May
26
comment Google does not index data from custom table used for a plugin
Have you tried using custom post types and post meta rather than custom tables?
May
26
comment Stop Duplicating Terms in a Foreach Loop
You should escape your output, if your terms name was </button><script>alert('hello');</script><button>... the esc_attr should fix that
May
26
comment WordPress Site not working only on my pc after upload Image
I would expect this if you were trying to upload a massive file, reduce the images dimensions and file size and try again
May
26
comment Possibility of Create Site Specific CSS in a Multisite
You could use child themes!
May
26
comment WordPress Site not working only on my pc after upload Image
Can you be more specific about what you mean? When you say it's not working, can you explain how it's not working? It's not obvious what you're asking for, and very unclear/ambiguous
May
26
answered Custom Posts Types using Posts Category
May
26
comment How do I include pre-installed images in a theme?
Images aren't stored in the database, there are posts of type attachment yes, but the actual file is in the uploads folder, any solution would need to create an attachment, probably using media_handle_sideload along with a check to see if it's already been done, and you'll want to ask how to run code when a theme is first activated. However I recommend against auto-creating pages on theme activation ( especially since the user may just be previewing the theme, and have their menus set to auto-add top level pages, hey presto you just broke their site )
May
26
comment how to find duplicated permalinks?
If you can't find it, how do you know it exists?
May
25
comment Wordpress page and plugin list using sql query
So "From MySQL, how would I query all published pages, and all activated plugins on a single site?"
May
25
revised Wordpress page and plugin list using sql query
added 20 characters in body
May
25
comment How do I include pre-installed images in a theme?
Can you elaborate more on what you mean by preinstalled images? Examples would be super useful
May
25
comment Wordpress page and plugin list using sql query
You'll have to be more specific than that, do you mean installed plugins? Activated plugins? Deactivated plugins? Published pages? Private pages? Trashed pages? You would get better results by editing this question to only ask for all pages, then opening a second question for all plugins, as they're both different questions with different answers. If you want a single SQL query that does both, that's not possible, and where plugins are concerned, what you mean by all plugins means an SQL query may or may not be possible
May
25
comment Contact Form value=“e-mail address” doesn't work
Or you could pass in your email into that function? echo strhex( "this is a string" )