Takashi Matsuyama


My Favorites

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



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.

Read More

Error Outputting List



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?

Read More

Compatibility with WPML



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 🙁

Read More

Share guest wishlist



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.

Read More

Plugin not working correctly for logged-in user



Replies: 4


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:

  1. 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.
  2. 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).
  3. The delete all and load more only show up when the other shortcode is also loaded: [ccc_my_favorite_list_menu slug="favorites"].
  4. 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.

Read More

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.

Browsing History