Support » Plugin: WP Socializer - Simple & Easy Social Media Share Icons » How to use Custom HTML within shortcode.

  • Resolved steveclash

    (@steveclash)


    Hi.

    I am trying to place share buttons on one of my pages. The buttons would be Facebook and a custom HTML button for text message sharing. The page I want to place the buttons on is a different URL then the page I want users to share. Due to this, I believe, I need to use the custom shortcode. I have not problem setting up the shortcode but I do not know how to set the custom HTML button inside the shortcode.

    Can you tell me what parameters I can use to set the Custom HTML button’s image and size inside the shortcode?

    My Custom HTML button code: https://i.imgur.com/sxwiHIY.png
    My current shortcode without HTML button: https://i.imgur.com/FHnK1ti.png

    Thank you for any help. Love the plugin. I tested 5 other social share plugins first and yours is so simple and actually does what I need. Good job!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter steveclash

    (@steveclash)

    One other question: Is there anyway to get stats on how often people click the share buttons? I do not want to use a counter but would like to know if people are using the buttons.

    Thank you!

    Plugin Author vaakash

    (@vaakash)

    Hi @steveclash,

    Thanks for using WP Socializer.

    With shortcodes, we cannot set custom HTML. We can only choose the icons.

    In shortcode you can refer one of the two templates which you have saved i.e [wpsr_share_icons template="1"]

    But the problem is we cannot pass custom page URL, title etc.

    To do that please replace the entire wp-socializer/core/shortcodes.php file with this code https://gist.github.com/vaakash/ace7e1c10026aa487268c757806693c2 (you can use an FTP if needed or the plugin editor)

    With that you can do [wpsr_share_icons template="1" page_url="https://google.com"] I didn’t get a chance to test this, but it should work.

    I’ll make this change official in the upcoming version may be in couple of weeks.

    Thanks,
    Aakash

    Plugin Author vaakash

    (@vaakash)

    Regarding the analytics, it is not supoported right now. But I have plans to support it in the near future. (no timeline for it right now)

    If you are aware of JS and use google analytics, then you can send click event to Google analytics which I can’t explain more as it is beyond the plugin’s scope.

    Thread Starter steveclash

    (@steveclash)

    Hi Vaakash! Thank you for the helpful reply.

    When I change the shortcode.php file would I be able to use the other parameters like Page_title?

    I will look into JS and Google.

    Thank you. Very good plugin. Like I said I spent a bunch of time downloading and research many and this for sure the best.

    • This reply was modified 9 months, 3 weeks ago by steveclash.
    Plugin Author vaakash

    (@vaakash)

    Hi @steveclash,

    Yes, you can use all the parameters which start with “page_” as mentioned in the table.

    Happy that you like the plugin.
    Please do rate the plugin !

    https://wordpress.org/support/plugin/wp-socializer/reviews/?rate=5#new-post

    I’ll mark this thread closed. Please reply back if anything related to this.

    Thanks,
    Aakash

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to use Custom HTML within shortcode.’ is closed to new replies.