You can create a favorite list of pages or posts in easy and faster way.
For developing please see related file
This plugin allows you to create wish lists or bookmark for your website pages, posts or product sheet, and display them on any post or page with simple shortcode or code into your theme as well. It add items by AJAX system and it's check if user is login or not, you can add or remove list only as login user. GD MyList use Handlebars Js as template framework, and Fontawesome (v5.0 free) as icons.
- [v1.0] create setting control panel (find it in Settings/GD Mylist) with the cabality to control: user login, use font awesome icon, hook button to content directly
- [v1.0] refactoring template files with Handlebars Js. Now are only two files
- [v1.0] add the GD MyList button directly
- [v1.0] update Fontawesome library with v5.0 free
- [v1.0] performing improvement
- [v0.4] items counter, active or not (active by default)
- [v0.4] improve share component with: Twitter, Email and Whatsapp (please read note)
- [v0.3] Multilingual support (English, Italian, Nederland [thank you Nick]) with template .pot file
- [v0.3] Support mqtranslate and qtranslate-x
- [v0.3] You can activate (active by default) Wishlist share button on Facebook and as Link with separate template
- Availability to choose if no logger user can use it or not (it is available by default), the wishlist will be expired after 30 days
- You can customize every single buttons/lists by templates
- You can call button and list by shortcode or by php code directly into the template
- It's tested on posts, pages and woocommerce products's pages
- Upload plugin .zip file to the
/wp-content/plugins/
directory and unzip - Activate the plugin through the 'Plugins' menu in WordPress
- Use the shortcode in your posts and pages to display your button or MyList (more info in FAQ)
- You can chouse if the user have to login or not, the plugin not request to be login by default
There are three ways by your needs:
1. By control panel By default the button will be add before the post/page content. That means you will se the button in the post/page list and into the post/page itself. You can anable/disable this function from the control panel. In the admin area go to "Settings/GD Mylist".
2. By Shortcode if you needs a single button in a page or post or product sheet, just write
[show_gd_mylist_btn]
in the content
3. By code into theme if you needs to put the buttom in themes code, just write
<?php
$arg = array (
'echo' => true
);
do_action('gd_mylist_btn',$arg);
?>
where do you want that button will show it
4. In case you need add it in post list or carousel In case you need add it in post list page or carousel, it means with multiple thumbnails with add-lo-list button. You can add it by add the following code in theme code:
<?php echo do_shortcode('[show_gd_mylist_btn item_id= '. $customPost->ID . ']'); ?>
yuo can show MyList list by shortcode, just create a page (eg: myList) and put into the content the shortcode
[show_gd_mylist_list]
to disable share button
[show_gd_mylist_list share_list='no']
to disable count items
[show_gd_mylist_list show_count='no']
Go to the setting panel (Settings/GD Mylist) and check Yes in case you whant allow the anonymous user.
Note
In case has anonymous user, the user's id data will be storage in a cookie by GD-Mylist.
Cookie name is: gb_mylist_guest
, the expiration date is 30 days, and store only the Guest ID in order the create the list.
Yes, I use Handlebars Js as template. Here you can find the official documentation.
The files are in template folder:
- box-list.html
- button.html
I use Font Awesome as icon framework Font Awesome. You can change the class name from Control Panel (Settings/GD Mylist).
- Frontend - MyList Log Bottom Add MyList
- Frontend - MyList Log Bottom Remove MyList
- Frontend - MyList show MyList
- Control Panel
- refactoring: completly php refactoring with adding unit testing
- bugfix: allways appear login alert in case of anonymous user function is disable
- create setting control panel (find it in Settings/GD Mylist) with the cabality to control: user login, fontawesome icon, hook button to content
- refactoring template files with Handlebars Js
- add the GD MyList button directly to content
- update Fontawesome library with v5.0 free
- performing improvement
- add wish items counter
- add Twitter, Whatsapp and Email as share method
- fix share link
- fix post title not appare on the list on not Multilingual sites (thank’s ‘svenol’)
- Multilingual support (English, Italian) with template .pot file
- Support mqtranslate and qtranslate-x
- You can activate (active by default) Wishlist share button on Facebook and as Link with separate template
- Fix call code into template (thank’s ‘nabjoern’)
- Fix view problems on wishlist’s list page
- Add login/no login case
- Now you can put the button into the content
- Initial release
new functions and fix
new functions and fix
new functions
second release
first release