WordPress.org

Ready to get started?Download WordPress

Forums

Hupso Share Buttons for Twitter, Facebook & Google+
[resolved] Hupso duplicates above custom field (16 posts)

  1. Liz
    Member
    Posted 1 year ago #

    I'm trying to insert a custom field onto my template page and posts. However, whenever I insert:`
    <?php echo $cfs->get('tagline'); ?>

    the hupso share button appears directly above my custom field, ie. 'tagline' on the page/post.

    I am not using hupso shortcode. I have it directly posting to my page and posts above content on plugin settings.

    http://wordpress.org/extend/plugins/hupso-share-buttons-for-twitter-facebook-google/

  2. kasal
    Member
    Plugin Author

    Posted 1 year ago #

    Try including <?php $HUPSO_SHOW = false; ?> above your code.
    Does it work?

  3. remtheory
    Member
    Posted 1 year ago #

    Hi there, I have the new single-qa_faqs.php template created and it's loading fine, but <?php $HUPSO_SHOW = false; ?> doesn't seem to disable the SHARE functionality. I've placed it right below the call to the header in the template and a few other places, but no luck. Any other ideas?

  4. kasal
    Member
    Plugin Author

    Posted 1 year ago #

    Make sure you do this before div id="content". This will hide the buttons in content. Share buttons will still show in widget (if used).

  5. remtheory
    Member
    Posted 1 year ago #

    Sorry but there is no div id="content" in this template. Can I send you the php file? Or you can just take a look at the source code at http://www.greenbee-web.com/slba/faqs/can-i-discharge-my-student-loans-if-i-am-dissatisfied-with-the-school-i-attended/?

    Thanks!

  6. kasal
    Member
    Plugin Author

    Posted 1 year ago #

    Put it before: <div class="content-wrapper ">.
    What exactly are you trying to do? I see share toolbar (no duplicates) under your post. How would you like to change this?

  7. remtheory
    Member
    Posted 1 year ago #

    Hi there! Sorry I should have opened up a new thread. I tried adding the template tag there, but still no luck, the SHARE links still appear.

    I just want to remove the share link, it doesn't have anything to do with duplicates. I did a google search on <?php $HUPSO_SHOW = false; ?>, and this came up, so I thought I'd tack on, but please let me know if you'd prefer I open up a new thread, I'd be happy to!

    What I want to do is hide all references to the SHARE link on FAQ posts. Here's why. I have an FAQ page (http://www.greenbee-web.com/slba/faqs/) that shows posts all together, so what's happening is the SHARE link is appearing in each FAQ on this page, which looks odd. So, to fix this, I was hoping just to remove the share links entirely from the FAQ posts. The shortcode does work perfectly, but I'd rather not have to add the shortcode for every FAQ if there's a way to do this in the template.

    I added the code below the wrapper as you suggested, and I also tried it after it, but no success. I know this template is being pulled in because I'm able to add code and see it on the FAQ page. It's just this tag that isn't using. Do you have any further suggestions? Thanks again!!

    <?php $HUPSO_SHOW = false; ?>
    <div class="content-wrapper <?php echo $sidebar_class; ?>">
    <div class="page-wrapper">

  8. kasal
    Member
    Plugin Author

    Posted 1 year ago #

    There is an option to hide buttons for specific categories in plugin settings. So you can hide buttons for every post in faq category. Would that be ok?

  9. remtheory
    Member
    Posted 1 year ago #

    Unfortunately the categories related to the FAQ post type aren't appearing as options, though if they did, that would work. Only my blog post categories are showing in the list, not the FAQ categories. Any other thoughts? :)

  10. kasal
    Member
    Plugin Author

    Posted 12 months ago #

    You need to have <?php $HUPSO_SHOW = false; ?> at the top of the template file that handles FAQ posts.

  11. remtheory
    Member
    Posted 12 months ago #

    Hi! Okay so I've tried putting that tag everywhere in that template file. At the top as you just suggested, but also above div content-wrapper, also as you suggested... all over. I even tried adding the do_shortcode to the template, but it only echo'd the short code, not the results of it (you can see it on http://www.greenbee-web.com/slba/faqs/can-i-discharge-my-student-loans-if-i-am-dissatisfied-with-the-school-i-attended/ before div content, and after the category links, but no luck whatsoever. I'm completely at a loss. Any other ideas?

  12. kasal
    Member
    Plugin Author

    Posted 12 months ago #

    [hupso_hide] only works inside post's content. You should use [hupso] as a shortcode, but this will display the buttons, not hide them.

    Try to change your theme and check if it works.
    If it does, then you can be sure the problem is theme related.
    Since you seem to be using a premium theme, I would suggest that you contact the theme author.

  13. remtheory
    Member
    Posted 12 months ago #

    Welp, I've changed the theme to use the default twentytwelve theme. You can see I've added text and the code right before div id = content. But the share links still show. It looks like it may be on your end.

    http://www.greenbee-web.com/slba/faqs/can-i-discharge-my-student-loans-if-i-am-dissatisfied-with-the-school-i-attended/

  14. remtheory
    Member
    Posted 12 months ago #

    Alrighty, my partner in crime figured it out. I actually needed to have

    global $HUPSO_SHOW;
    $HUPSO_SHOW = false;

    At the very top.

    Now it works like a charm!

    You may want to update your documentation!

  15. kasal
    Member
    Plugin Author

    Posted 11 months ago #

    You are right. If you are inside a PHP function, you should use:

    global $HUPSO_SHOW;
    $HUPSO_SHOW = false;

    I will add that to documentation.

  16. remtheory
    Member
    Posted 11 months ago #

    Thanks so much Kasal, have a lovely day. :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic