Support » Plugins and Hacks » Hupso Share Buttons for Twitter, Facebook & Google+ » [Resolved] Hupso duplicates above custom field
[Resolved] Hupso duplicates above custom field
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.
<?php $HUPSO_SHOW = false; ?>above your code.
Does it work?
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?
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).
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/?
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?
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; ?>”>
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?
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? 🙂
You need to have
<?php $HUPSO_SHOW = false; ?>at the top of the template file that handles FAQ posts.
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?
[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.
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.
Alrighty, my partner in crime figured it out. I actually needed to have
$HUPSO_SHOW = false;
At the very top.
Now it works like a charm!
You may want to update your documentation!
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.
- The topic ‘[Resolved] Hupso duplicates above custom field’ is closed to new replies.