• Resolved Tnace

    (@radiocure1)


    Hi,
    I’ve enabled the Scriptless social sharing buttons on various pages of my site. However, for some reson when I use the code below it only shows the social SVG icons when I insert the sharing buttons via your plugin’s setting either before or after the post.

    <div class="post-mobile-share"><?php echo do_shortcode('[scriptless]') ?></div>

    Is there a way to insert the plugin shortcode without having to enable the buttons on the settings of your plugin?

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

    (@littlerchicken)

    Your code works for me when I place it in the footer of a sample theme. You do need to make sure that you’ve selected “Manual Placement” for the post type where you are adding the code, to make sure that the plugin styles and icons load. If you have that option checked and not the before or after options, you should have the buttons you want.

    If that is not working, you may need to share a link to an affected page–I may not be able to diagnose what’s going on just from looking, but I may be able to help offer other suggestions.

    Thread Starter Tnace

    (@radiocure1)

    I have manual placement enabled but I’m not seeing the icons. The page is: https://crystalpendulum.com/category/crystals/
    But the site isn’t live yet so I’d need to give you the username and pass to access it. Can I email it to you?

    Plugin Author Robin Cornett

    (@littlerchicken)

    Thread Starter Tnace

    (@radiocure1)

    Just sent, thanks!

    Plugin Author Robin Cornett

    (@littlerchicken)

    So the plugin does not work on archives unless you force it to–it’s totally intended for singular posts/pages/content. You can force the plugin to allow the buttons to be displayed (and load stylesheets, etc.) by using the “can do” filter in the FAQ. So I would try adding that first–however, it’s not going to behave the way you will want it to, in that the sharing links will be using the data from the last post on the archive page (in your case, rose quartz).

    You could optionally work with the filter above and something like the URL filter and build the URLs to be what you need them to be on archive pages.

    Note: I do not see that your site is loading an SVG sprite file, so that’s also preventing the icons from showing, but the sharing links are a more significant issue. To know why your SVG icons are not loading, I would need to know how you are adding them to your site.

    I hope that helps clarify where you will want to look next. (Answering here in case it helps someone else)

    Thread Starter Tnace

    (@radiocure1)

    Hi Robin,
    I’m using your default SVG built into your plugin that I downloaded on github.com. The “can do” filter worked! Still having an issue with displaying the SVGs. They only show up on the page if I select them to appear before or after the post.

    Plugin Author Robin Cornett

    (@littlerchicken)

    Oh goodness, if you are using the develop branch version of the plugin, that’s putting you squarely in Anything Can Happen Thursday territory. That version does include the SVG icon option, but as you can see, I’m still working out the kinks on how to make that work. But depending on what day (or even hour) you downloaded the plugin from Github, a lot has likely changed.

    The good news is, you found a bug for me in how I’m implementing the SVG, so thank you for that! I will get that fixed this morning. But I would say that right now the develop branch of the plugin is definitely not what I would consider to be stable, so depending on your time frame, you may want to change to the master branch instead (or download it from the repository directly), which is the current version of the plugin.

    Thread Starter Tnace

    (@radiocure1)

    Ha, yea I’m using the dev version as I couldn’t figure out how to implement SVGs in the main version. That’s good to hear about the bug. I’ll download the latest version when you’re finished and happy to let you know if I see any other bugs.

    Plugin Author Robin Cornett

    (@littlerchicken)

    Well, if you like living on the edge, you could go ahead and replace your version with the one that’s there right now–it’s got the shortcode fix in, and is not currently throwing any errors for me, at least that I can tell. So I think visually you would have the output you want, and then could work on the URL behavior.

    Thread Starter Tnace

    (@radiocure1)

    That worked perfectly, thanks Robin! No issues on our end.

    Thread Starter Tnace

    (@radiocure1)

    Robin, found another bug in the dev version. Want me to email you or continue with this thread?

    Plugin Author Robin Cornett

    (@littlerchicken)

    For the development version, email me directly, or create an issue on the Github repo–thanks!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Display Using PHP – SVG Don’t Appear’ is closed to new replies.