WordPress plugin “My Favorites”
Save user’s favorite posts and list them.
This plugin is simple. You can save the user’s favorite posts just a install and display them anywhere you want with just a shortcode. The logged-in user’s data is saved in the user meta. Other user’s data is saved to Web Storage (localStorage).
Support on WordPress.org
WordPress.org Forums » [My Favorites] Support
session_start() – session_write_close
detail
Replies: 1
Good day,
I encountered a problem while using popular plugins.
WordPress reports:
A PHP session was created by calling the session_start() function. For hitting REST API and loopback requests. The session should be closed using session_close() with an HTTP prewrite request.
In app/Bootstrap.php I hit the beginning of the session:
if ( !session_id() ) session_start();
If I turn off the plugin the problem no longer appears. It also causes other complications for me, I’m not a programmer so I don’t know how to fix it, so I want to ask if it’s possible to fix it?
Thank you and have a nice day.
detail
Replies: 0
I am seeing a sporadic error when trying to output a list of favorites on a page. Anonymous visitors are able to add to the list and I can see the array stored in local storage, but when visiting the favorites listing page we get “Forbidden” rather then the list of post. This seems to be coming from your list_posts_action() function? We are using the LiteSpeed caching plugin and thinking this is issue and if simply excluding the listing page from the cache would resolve the issue?
detail
Replies: 0
Does anyone know if it’s possible to use this plug-in on multi lingual sites? It’s working great for the primary language but not at all for the secondary ones 🙁
detail
Replies: 1
Has anyone successfully extended this plugin to include a share function, ie; adding a unique ID parameter which so a wishlist can be emailed?
Would need to work without logging in.
Plugin not working correctly for logged-in user
detail
Replies: 3
Hello,
Thank you for this plugin.
So far, it works perfectly when testing for users who are not logged in. However, when I am logged in there are some problems:
- After I favorite a post the icon is filled in and is added to the favorites list. However, when I navigate back to the post the icon is no longer filled in.
- The
favorites
page I set up to display the list isn’t working properly. If I try to unfavorite a post it goes away, but when I refresh the page it is there in the list again. Also, the number of favorites says 1/2 or even 3/5 even though I have only 1 or only 3 favorites saved (this might be because after running into the previous issue I clicked the favorite button a few times). - The
delete all
andload more
only show up when the other shortcode is also loaded:[ccc_my_favorite_list_menu slug="favorites"]
. - The only way to remove favorites is with the
delete all
link. However when I refresh the page it says I have 0/1 favorites.
In conclusion, something funny is going on with the database for logged-in user, but it works just as expected for users who are not logged-in. I should also mention I am testing the plugin on localhost
.
Development on GitHub
GitHub - takashi-matsuyama/my-favorites: WordPress plugin "My Favorites"
WordPress plugin "My Favorites". Contribute to takashi-matsuyama/my-favorites development by creating an account on GitHub.