Support Forum
Hello team,
I just updated my Simple Press and all my SP plugins and themes.
I noticed my [postthanks-short-code] code is no longer working in the footer of my forum and also in my blog sidebar widget.
- Do you know how to get it working again?
- What is the best way for me to add this to my child theme so it doesn't happen again after the next upgrade?
Thank you for the support.
Nope. we dont have any shortcodes for that plugin - never have...
you can see a list of available template functions here: https://simple-press.com/docum.....st-thanks/
agree with @yellow-swordfish sounds like some custom code... likely someone added a simple shortcode to call our template function... perhaps you could share the hook registering the shortcode?
Visit Cruise Talk Central and Mr Papa's World
Thanks guys.
Yes it appears there was some custom coding added to the functions.php file:
function wpc_shortcode_postthanks(){
if (function_exists('sp_thanks_user_stats')) {
?><div style="width:100%; margin:0px 0 10px; padding:0%; float: left; text-align: center;" >
<?php sp_thanks_user_stats('tagclass=spCenter spThanksUserStats', get_current_user_id(), '<span style="padding-top: 10px;">Thanked %THANKED% times</span>'); ?></div>
<?php } else{
//echo 'no action';
}
}
add_shortcode('postthanks-short-code','wpc_shortcode_postthanks'); ?>
So to preserve this shortcode through plugin updates, is it as simple as adding this custom code be added to the Child Theme functions.php?
Thank you.
I just have one last question which I ask in this quick video.
yes, the indicated location would be fine...
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)