WordPress.org

Ready to get started?Download WordPress

Forums

WP Float
Disable from some pages? (9 posts)

  1. brycerafflesound
    Member
    Posted 1 year ago #

    I'm wondering if it is possible to disable the floating button manually on just one page. I want it to show up on all pages, posts, etc. with one exception.
    If not, the only thing I can think of is to manually add the shortcode to add it on every other page and post, which would be somewhat ridiculous.

    http://wordpress.org/extend/plugins/wp-float/

  2. samhagin
    Member
    Plugin Author

    Posted 1 year ago #

    you can manually add the code below to the page you wish to remove it from

    <script>
    jQuery(document).ready(function() {
     jQuery('#wp-float-widget').remove()
    });
    </script>

    where wp-float-widget is the exact ID for the floating item on the page. if you are unable to find the ID, provide a link to the page with WP Float and I can help you.

  3. brycerafflesound
    Member
    Posted 1 year ago #

    Thank you so much for getting back to me so quickly. Really appreciate it.
    I'm not sure where I would find the ID...?
    This is the page it's on:
    http://www.brycerafflesound.com/contactform/

    btw, really love this plugin.

  4. samhagin
    Member
    Plugin Author

    Posted 1 year ago #

    from the source of that page you have this

    <div id="586-wpf">
                    <a class="fancybox-iframe{scrolling:no, width:100, height:100}" href="http://www.brycerafflesound.com/contactform/"><img alt="" src="http://brycerafflesound.com/images/Contact-b.png" width="40" height="140" /></a>                     </div>

    so the id is 586-wpf, the code will then be

    <script>
    jQuery(document).ready(function() {
     jQuery('#586-wpf').remove()
    });
    </script>

    simply put that in the post/page in HTML/text mode , not visual. visual mode will most likely break it

  5. brycerafflesound
    Member
    Posted 1 year ago #

    Thanks again for the reply. I tried that and oddly enough, it didn't seem to do the trick.

  6. samhagin
    Member
    Plugin Author

    Posted 1 year ago #

    it is not clear as to what you wish to remove from the page, what item is being used with WP Float on http://www.brycerafflesound.com/contactform/, it is the "contact us" button ? also which option did you use to add the button, did you use widget, shortcode or settings >> wp float options ?

  7. brycerafflesound
    Member
    Posted 1 year ago #

    Yes, it's the Contact button. I used Settings >> WP Float Options to add the button.

    (Basically what I've got going on is the floating contact button on all pages - when someone clicks that button it opens up the contact page in a pop-up window (which isn't working either right now, but that's beside the point). But yeah, I don't want the floating contact button to show up in the pop-up contact page as it seems redundant.)

  8. samhagin
    Member
    Plugin Author

    Posted 1 year ago #

    try using this in HTML mode for the post you do not want it to show on

    jQuery(document).ready(function() {
    jQuery('.fancybox-iframe').remove()
    });

    demo http://jsfiddle.net/Ea65g/

  9. brycerafflesound
    Member
    Posted 1 year ago #

    Thanks so much! It's working now.
    Actually, the first time I tried that, it didn't work, but I found out when attempting to fix another plugin that my theme was using an older version of jquery.

    Here's what I did to fix it:

    Look inside functions.php to find this URL:
    https://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js
    If it's there, simply change it to:
    https://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js
    But that will not be enough because upgrading the jQuery library will cause an error in a theme script file, which you can solve by editing the theme file js/vt.js. Find near the end of the file the part that starts with
    // pf
    and ends with
    // end pf
    and completely remove that part

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.