Support » Plugin: Simple Author Box » Stopping template changes with updates

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author GreenTreeLabs

    (@greentreelabs)

    Hi,

    sorry for the late response. You can use the sabox_author_html filter inside the functions.php of your theme, for example:

    function custom_author_html()
    {
    	return "<span>Author of this post:</span>";
    }
    
    add_filter('sabox_author_html', 'custom_author_html');

    Thanks. Do I need to do anything to specify where the code is placed? Also, will this work for replacing line 26 with this code?

    $sab_author_link = sprintf( '%s', esc_html( get_the_author_meta( 'display_name', $sabox_author_id ) ) );

    • This reply was modified 2 months, 2 weeks ago by rocketpig3.
    Plugin Author GreenTreeLabs

    (@greentreelabs)

    Thanks. Do I need to do anything to specify where the code is placed?

    It can be placed anywhere in your functions.php just be sure not inside another function.

    Also, will this work for replacing line 26 with this code

    I’m not sure I understand what you mean. You don’t need to edit the plugin.

    I’m just not sure how these changes work.

    This code will add the author title:

    function custom_author_html()
    {
    	return "<span>Author of this post:</span>";
    }
    
    add_filter('sabox_author_html', 'custom_author_html');

    This makes sense.

    So what would I add to my functions.php to replace line 26 in the template with this, as per the second thread?

    $sab_author_link = sprintf( '%s', esc_html( get_the_author_meta( 'display_name', $sabox_author_id ) ) );

    Something like:

    function custom_author_html()
    {
    	$sab_author_link = sprintf( '%s', esc_html( get_the_author_meta( 'display_name', $sabox_author_id ) ) );
    }
    
    add_filter('sabox_author_html', 'custom_author_html');

    I feel like this is incorrect. Maybe it isn’t.

    Thanks.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    @rocketpig3 Don’t double post, duplicates get removed when found and I have removed your new one. If you have something to add, please do so here.

    rocketpig3

    (@rocketpig3)

    @jdembowski What do you suggest I add? Nothing has changed, I just didn’t get a response to my question in this thread. ¯\_(ツ)_/¯

    If someone from the plugin team could help out that would be much appreciated.

    Plugin Author GreenTreeLabs

    (@greentreelabs)

    I’m sorry @rocketpig3 I promise I’ll check this in a couple of days!

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Also the author may or may not know about this view.

    https://wordpress.org/support/plugin/simple-author-box/active/

    That gives the author (or anyone) the ability to see active topics in a plugin’s support forum. There is no need to create any duplicate topics.

    rocketpig3

    (@rocketpig3)

    @greentreelabs Thanks guys, no rush!

    rocketpig3

    (@rocketpig3)

    @greentreelabs

    Hey team, just looking to follow up, have you had the chance to look at this yet?

    Thanks.

    Plugin Author GreenTreeLabs

    (@greentreelabs)

    Hi, sorry for the late reply. I read again the thread but still not sure what you mean for the second request. You’d need a filter in order to remove the link to the author’s page? Currently it’s not available.

    So it’s not possible to remove the link to the author’s page, and prevent this link being removed during plugin updates?

    The first fix doesn’t work either. The text displays inside the box, not above it as it does with the change made in the thread.

    I suppose I’ll just not update the plugin.

Viewing 12 replies - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.