Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

Bookmark Placement

by

Tips and Tricks HQ Support Portal › Forums › WP eMember › WP eMember Tweaks › Bookmark Placement

  • This topic has 11 replies, 2 voices, and was last updated 13 years, 8 months ago by jeffw.
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • August 18, 2011 at 1:24 am #4093
    jeffw
    Member

    Hi.

    I read a comment about bookmark placement and you recommended turning off bookmarks from the plugin then adding your own filter for placement. Well, only problem is that when you turn off bookmarking via the plugin and then go to view bookmarks, it says bookmarking is disabled. Didnt even get to the point of writing a filter because this breaks the whole point.

    Any way you can write a simple function and add this functionality please? It would be very beneficial to developers. Thanks.

    August 19, 2011 at 12:01 am #35637
    admin
    Keymaster

    Can you please post a link to the post your referring to so I can catch up?

    August 19, 2011 at 5:15 am #35638
    jeffw
    Member

    How to Use the Bookmarking Feature in WP eMember

    There you are.

    August 19, 2011 at 11:42 pm #35639
    admin
    Keymaster

    Thank you… a lot of users were just embedding the bookmark shortcodes without enabling the features so we added that check.

    You can turn check off just by tweaking one line. Open the “eMember_bookmark_utils.php” file and search for the following line of code:

    if(!$enable_bookmark) return EMEMBER_BOOKMARK_DISABLED;

    once you find it simply delete that line and it won’t do that check anymore.

    The filter you need to add is for the following function (this function show the bookmark buttons):

    boomark_handler

    The above function name has a typo but the computer does’t care about that :)

    August 20, 2011 at 12:20 am #35640
    admin
    Keymaster

    Updated the function name to correct the typo. So now the function name is:

    bookmark_handler

    August 20, 2011 at 2:52 am #35641
    jeffw
    Member

    Thanks admin. :)

    August 20, 2011 at 3:08 am #35642
    jeffw
    Member

    What am I supposed to declare for argument 1? There is just one argument, which is $content, and its being defined in the function I thought. :|

    August 20, 2011 at 3:08 am #35643
    jeffw
    Member

    What am I supposed to declare for argument 1? There is just one argument, which is $content, and its being defined in the function I thought. :|

    August 20, 2011 at 7:30 am #35644
    admin
    Keymaster

    $content will be the content of the post that will be passed down to that function by WordPress (you don’t have to call that function… it will get called automatically by WordPress). That function essentially appends the bookmark button in the post content.

    So you can either modify that function itself or remove that function from the plugin and add in the same function name with your custom code in your theme’s function.php file.

    If you want to just customize the location of the bookmark button then use this tweak:

    https://support.tipsandtricks-hq.com/forums/topic/emember-how-to-move-the-bookmark-button-to-a-custom-location-on-the-page

    August 20, 2011 at 2:26 pm #35645
    jeffw
    Member

    Right, thats what I thought because I saw the global call.

    I was trying to add it as a function instead of hooking it.

    I.e. if member is logged in, do function boomark_handler();

    I want the exact same function, just want to be able to place it wherever I want, in my case, the sidebar.

    August 20, 2011 at 10:34 pm #35646
    admin
    Keymaster

    By default, eMember has the following call… it adds the bookmark to the post content

    add_filter('the_content', 'bookmark_handler');

    Simply call this function and pass the content of the widget and it will add the bookmark button to that widget.

    With that said, I can see what you are trying to do but it may not be possible. You are trying to add bookmark button to the sidebar but the sidebar is outside the WordPress main loop. You cannot do post specific actions outside the WordPress loop because the data is not available there. So yes it will add a bookmark button but when you click on it it needs to save the ID of the post and that information is not available outside the WordPress loop. Not all WordPress filters and hooks work outside the loop.

    August 21, 2011 at 4:49 pm #35647
    jeffw
    Member

    I see. Thought I could recall the_post, but I guess not.

    I’m trying to hook it and it still won’t work. Ah well. :|

  • Author
    Posts
Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ