Bookmarks
The Bookmark addon allows attendees to bookmark events and organizers to bookmark attendees easily.
It is compulsory for a user to login in to bookmark an event. Users can also add personalized notes to an event while bookmarking.
Installing the plugin
The installation process is the same for all the addons, offered by WP Event Manager. They can be both installed automatically and manually.
- Automatic Installation : You can install the plugin from the backend of your WordPress. Click Here to see how you can install the plugin automatically.
- Manual Installation : You can install the plugin from the backend of your WordPress. Click Here to see how you can install the plugin manually.
Complete Video Guide On Bookmarks Add On
How To Bookmark an Event and Add Note?
In order to add a bookmark, a user needs to log into WP Event Manager.
- Login to your account.
- Visit the Event Detail Page, it will show a bookmark box at the top of the listing. This will look something like the following image:
- Clicking on the “Bookmark this event” button will open the “Add Bookmark form”. Here, a user can add a note for the bookmark if he or she wants to and save it.
- After bookmarking, you can check all the bookmarked events on the page named My Bookmarks or you can click on the here button.
Note: An organizer needs to follow the same process, mentioned above.
How to remove bookmarks from an event detail page from the Frontend?
Users can remove bookmarks from only those events which are already added to the list of bookmarked events.
- Go to the Event dashboard.
- You need to click on the specific bookmarked event that you want to remove from the bookmark list.
- Then go to that event detail page and this time you will get the Remove Bookmark option.
- Clicking on the Remove Bookmark option, the bookmark will be removed from the event.
Another way to remove bookmark is mentioned below:
- Go to the event dashboard.
- Click on Bookmarks.
- Here you can view all the bookmarked events.
- Go to the Action section of the specific event from which you want to remove the bookmark.
- Click on the Delete icon.
How To Get the List of All Bookmarked Events Using Shortcodes?
To access the list of all bookmarked events with shortcodes, you need to follow the below mentioned steps:
- Create a new page with these steps WP-admin >> Pages >> Add New.
- Name it “My Bookmarks”. or “My Event Bookmarks”.
- Add this shortcode inside the content area: [event_manager_my_bookmarks]
It is recommended for you to insert the shortcode into the ‘text’ view of the visual editor to ensure it gets formatted correctly.
- The [event_manager_my_bookmarks] shortcode displays all the event listings that the user has bookmarked (events and attendees).
- Each bookmark links to the event/attendee in the table. Users can also edit/update and delete the bookmark details from this table.
Advanced: Managing Bookmark Button & Bookmark Form
- The bookmark form is hooked into the event page after the event meta place as shown below:
<?php add_action( 'single_event_listing_button_end', array( $this, 'bookmark_form' ) ); ?>
- To remove and move to a different place, you can do like this:
<?php /** * Move my bookmark message place to perfect place. * Show my bookmark message after button section that way we have hooked 'single_event_listing_button_end' hook and it will show at after button section. * @param array $steps * @return array * @since 1.0.0 */ function move_my_bookmark_events_message() { global $event_manager_bookmarks; if ( has_action( 'single_event_listing_button_end', array( $event_manager_bookmarks, 'bookmark_form' )) ) { remove_action( 'single_event_listing_button_end', array( $event_manager_bookmarks, 'bookmark_form' ) ); } if ( has_action('single_event_listing_button_end', array( $event_manager_bookmarks, 'bookmark_form'))) { remove_action( 'single_event_listing_button_end', array( $event_manager_bookmarks, 'bookmark_form' ) ); add_action( 'single_event_listing_button_end', array( $event_manager_bookmarks, 'bookmark_form' ) ); } else { add_action( 'single_event_listing_button_end', array( $event_manager_bookmarks, 'bookmark_form' ) ); } } add_action( 'wp', 'move_my_bookmark_events_message', 12 ); ?>
- In General, You can use your choice of custom hook to append the form to a different place.
<?php global $event_manager_bookmarks; add_action( 'your_custom_hook', array( $event_manager_bookmarks, 'bookmark_form' ) ); ?>
Advanced: Overriding/Customizing the Template Files
For overriding or customization, template files can be found in the wp-event-manager-bookmarks/templates/ directory. To override a template file, follow the below mentioned steps.
- First you need to create directory “wp-event-manager-bookmarks” under your theme folder.
- Copy the template file to “/wp-content/yourtheme/wp-event-manager-bookmarks/” directory.
- Your theme will use all the template files from the “/wp-content/yourtheme/wp-event-manager-bookmarks/” directory instead of the plugin’s template file (/wp-content/plugins/wp-event-manager-bookmarks/).
- my-bookmarks.php template file lists the user’s bookmarks.
- bookmark-form.php template file which controls the bookmark form display on events and attendee page.
Remember: If you have overridden template file and plugin frequently updating then you need to sync template file with new updates from the plugin’s template file for better functionality and new features.