310 reputation
944
bio website
location
age
visits member for 3 years, 3 months
seen Mar 12 at 7:14

WordPress Consultant


Feb
4
comment Is this correct usage of filters in WordPress
Yes it works, my doubt is whether there is a more elegant way to do this, I am still not 100% sure on actions vs filters in such cases.
Jan
28
comment Deleting sites and users automatically in multisite
Indeed it's not. How can I modify it to delete all sites and users except the ones indicated in the arrays?
Jan
28
comment Deleting sites and users automatically in multisite
Oh ok, users still aren't being deleted though.
Jan
26
comment Deleting sites and users automatically in multisite
@user42826 Indeed, fixed that however now I get all the non needed sites deleted but their users remain.
Jan
23
comment Deleting sites and users automatically in multisite
I changed that, however for some reason the code is removing the posts and pages of the main site in the multisite (id 1) and also the superadmin user (id 1). Any idea why?
Jan
22
comment Deleting sites and users automatically in multisite
Basically I need to clear out all users apart from the 3 specified in the array.
Jan
22
comment Deleting sites and users automatically in multisite
@Rarst added more info.
Jan
21
comment Getting this code to work in Multisite
wordpress.stackexchange.com/questions/130705/…
Jan
21
comment Getting this code to work in Multisite
Still not working, updated the new version of the code I'm using above, can you check?
Jan
21
comment Getting this code to work in Multisite
I'd like to remove the users of these blogs too, trying this code but it's not working, can you help? $users_to_keep = array( '1','4','43' ); $users = get_users( array( 'blog_id' => $val['blog_id'] ) ); // Remove all users except for the test site admins foreach ( $users as $user ) { if ( ! in_array( $user['ID'], $users_to_keep ) ) { wp_delete_user( $user['ID'] ); } }
Jan
20
comment Retrieve a specific number of words from post_Content
I guess I need a way of skipping the img tags altogether and counting only the words, so I won't get unbalanced tags.
Jan
2
comment Speed optimization on WP site, Remove query strings from static resources
I guess the most important question is whether I will see any speed improvements by doing this? If not I'd gladly leave things as they are.
Dec
28
comment get_post_class() not working well
Got it, works now. We could also have used array_push() in this case I believe.
Dec
28
comment get_post_class() not working well
Added the code generating the classes.
Dec
13
comment Run function at specific time
Thanks that's what I was looking for. What kind of checking are you referring to though? I thought WP handles that on its own.
Dec
11
comment Do WordPress cron jobs slow down page loading?
Yes I just wanted to confirm that, since I've been reading that page loads and cron jobs run independently and so the page load isn't affected. However if as you say the cron job is heavy enough it will affect page load as a side effect.
Dec
11
comment Cron Lock Timeout, when to use?
Just trying to optimise my site, and I read that this can be useful for preventing stacking of cron jobs.
Dec
10
comment Cron jobs repeating themselves
@MichaelEcklund Good information about cron there but it doesn't clearly answer my question about whether the function runs pile up or whether the function is run just once.
Dec
4
comment Change wording of default thumbnail metabox
I'm marking this as the correct answer, but if anyone can add to it using JS that would be great.
Dec
3
comment Change wording of default thumbnail metabox
Yes that's true, would love to know of a better workaround if anyone has it.