Comments paolotome started the conversationDecember 12, 2019 at 7:32amHi,how can I overwrite wp-content/plugins/thegem-elements/inc/additional.php and use in child theme?thanks 7,092Oliver repliedDecember 12, 2019 at 8:21amHi,What you need to change?Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. Regards, Oliverpaolotome repliedDecember 12, 2019 at 8:26amI have modified this function "function thegem_attribute_post_title_with_date( $value, $data ) {}" to dynamically add an icon to the list of articles depending on the category to which the article belongs 7,092Oliver repliedDecember 12, 2019 at 8:29amIn your case you need to remove the filter: remove_filter( 'vc_gitem_template_attribute_post_title_with_date', 'thegem_attribute_post_title_with_date', 10, 2 );And then add your one in the child theme...Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. Regards, Oliverpaolotome repliedDecember 12, 2019 at 8:34amOK thanks. In what position can I insert it into the child theme? can't I overwrite additional.php file? 7,092Oliver repliedDecember 12, 2019 at 8:41amHi,can't I overwrite additional.php file? - no. it's not template. In what position can I insert it into the child theme? - Sorry?Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. Regards, Oliverpaolotome repliedDecember 12, 2019 at 8:45amsorry but I didn't understand where and how I can insert the modified function in the child theme 7,092Oliver repliedDecember 12, 2019 at 11:32amCode example: remove_filter( 'vc_gitem_template_attribute_post_title_with_date', 'thegem_attribute_post_title_with_date', 10, 2 ); add_filter( 'vc_gitem_template_attribute_post_title_with_date', 'thegem_attribute_post_title_with_date_new', 10, 2 ); function thegem_attribute_post_title_with_date_new( $value, $data ) { extract( array_merge( array( 'post' => null, 'data' => '' ), $data ) ); return '<div class="post-title"><h4 class="entry-title"><a href="'.esc_url(get_permalink()).'" rel="bookmark">'.mysql2date('d M', $post->post_date).': <span class="light">'. get_the_title($post->ID) .'</span></a></h4></div>'; } add_shortcode( 'gem_post_title_with_date', 'thegem_post_title_with_date' )Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. Regards, Oliverpaolotome repliedDecember 12, 2019 at 1:45pmthanks a lot. 7,092Oliver repliedDecember 12, 2019 at 1:53pmYou're welcome!Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. Regards, Oliver Sign in to reply ...
Hi,
how can I overwrite wp-content/plugins/thegem-elements/inc/additional.php and use in child theme?
thanks
Hi,
What you need to change?
Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list.
Regards, Oliver
I have modified this function "function thegem_attribute_post_title_with_date( $value, $data ) {}" to dynamically add an icon to the list of articles depending on the category to which the article belongs
In your case you need to remove the filter:
And then add your one in the child theme...
Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list.
Regards, Oliver
OK thanks. In what position can I insert it into the child theme?
can't I overwrite additional.php file?
Hi,
can't I overwrite additional.php file? - no. it's not template.
In what position can I insert it into the child theme? - Sorry?
Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list.
Regards, Oliver
sorry but I didn't understand where and how I can insert the modified function in the child theme
Code example:
Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list.
Regards, Oliver
thanks a lot.
You're welcome!
Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list.
Regards, Oliver