398 reputation
1314
bio website
location
age
visits member for 3 years, 4 months
seen 2 days ago

Mar
24
comment From child theme remove class which is added by parent theme?
tx Pietet that work out fine. i rewritten it a bit so i looks like the rest of my functions. But i notice the 20 was crucial to get the function to work correctly, why is this? function remove_masonry( $classes ) { foreach ( $classes as $key => $value ) { if ( $value == 'masonry' && is_category( 8 ) ) unset( $classes[$key] ); } return $classes; } add_filter( 'body_class', 'remove_masonry',20 );
Mar
24
asked From child theme remove class which is added by parent theme?
Mar
12
awarded  Popular Question
Mar
2
awarded  Yearling
Feb
18
comment How to Add Custom Fields to a Custom Post Type?
"why is prefix_teammembers_save_post triggered by add new?" have you found an answer, i am also stumbling on a extra function trigger which i can't recall?
Feb
17
comment Should I use add_action('publish_post or add_filter('publish_post?
hmmm, add_action('save_my-custom-products doesn't trigger the function but add_action('publish_my-custom-products does, but not getting the custom fields ofcourse
Feb
17
comment Should I use add_action('publish_post or add_filter('publish_post?
pieter, ah i think i see and i need to save_{$post_type} as i need the custom field value for further reference. Tx again.
Feb
17
comment Should I use add_action('publish_post or add_filter('publish_post?
Tx again, i see the triggers are working but $custom_meta = get_post_meta($post->ID); seems to be empty. How can i fix this? Are the custom fields not yet attached?? i am using advanced custom fields (wordpress.org/plugins/advanced-custom-fields)
Feb
16
comment Should I use add_action('publish_post or add_filter('publish_post?
hi pieter, i am trying your first suggestion and i am getting an WordPress database error: [Duplicate entry 'xxx' for key 'product_code'] each time. So i echoed some variables and i think $custom_meta = get_post_meta($post_id); is empty. Now i have rewritten it by get_post_meta($post->ID); but only on refresh i see data but a duplicat key. your second suggestion is just for new posts(inserts) and doesn't apply for edit/updates, right?
Feb
15
comment Should I use add_action('publish_post or add_filter('publish_post?
@birgire wow never looked into the add_action function, that indeed is suprising. Thanks for the class_exists suggestion!
Feb
15
comment Should I use add_action('publish_post or add_filter('publish_post?
Going to try both your suggestion tx a lot
Feb
15
revised Should I use add_action('publish_post or add_filter('publish_post?
added 23 characters in body
Feb
15
asked Should I use add_action('publish_post or add_filter('publish_post?
Jan
21
accepted How to handle text with function __(?
Jan
9
comment How to handle text with function __(?
Thank you Rarst, i am going to use large strings then. BTW i notice something strange which to me 1 hour to notice. POedit doesn't seem to like characters: é, because i get an error. Replacing the é with just a regular e i can update the poedit file again and go translate. Does this sound familar with POedit?
Jan
7
asked How to handle text with function __(?
Dec
12
comment Creating a custom theme; translate doesn't work?
Tx pieter, for your time and solutions. but still no luck. I also tried after_setup_theme, wp_head
Dec
12
comment Creating a custom theme; translate doesn't work?
yes, you are right. How can i fix this? i have tried function dep_inc_config(){ include('includes/config.php'); } add_action('init','dep_inc_config');
Dec
12
comment Creating a custom theme; translate doesn't work?
@PieterGoosen i noticed my setup works when i put the _e('Profiel', 'dep'); in the header. But in my theme setup i have a config.php with all the __(); declarations and have it included in functions.php. This however doesn't seem to work. i have set Text Domain: dep you are right about echo __(
Dec
12
asked Creating a custom theme; translate doesn't work?