• yarr2

    (@yarr2)


    How website name can be easily added to share text?

    There is a way with plugin template in a child theme:

    $share_text = rawurlencode( wp_strip_all_tags( $title ) ) . ' - ' . get_bloginfo( 'name' );

    but it would better just to have an option in customizer or add filter. Please could you assist so it will be unnecessary to track plugin changes on every version change.

    Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello @yarr2,

    Thank you for reaching out.

    You are currently using the best available approach and can keep using this method in the child theme.
    When updating the plugin, that file will not be overwritten and will remain exactly as you customized it.

    Hope it helps.
    Best Regards

    Thread Starter yarr2

    (@yarr2)

    It’s not the best available approach for sure.

    The best would be to update share text using a hook, so it will be set only in functions.php of a child theme. In this case it will be unnecessary to check and update template with every plugin update.

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.