Viewing 2 replies - 1 through 2 (of 2 total)
  • Personally, I use a custom shortcode in the excerpt of posts. The shortcode should accept an id param. Then I add the post ID as the id param of the shortcode. I can then add whatever I want in the shortcode. One could use a meta value as the actual excerpt (or include an excerpt param in the shortcode), and also add other shortcodes within the output of the custom shortcode, like Favorites (just remember to use the do_shortcode() function).

    Hassan

    (@repairappliancesdubai)

    To create an “Add to Favorites” button for random or recent posts on your homepage:

    1. Choose a Plugin: Install a plugin like “WP Favorite Posts” to enable the favorites functionality.
    2. Add Button: Use the plugin’s shortcode or widget to add the “Add to Favorites” button to your posts.
    3. Select Posts: Decide whether to show random or recent posts on your homepage.
    4. Customize Homepage: Use a widget or block to display both the button and selected posts.
    5. Style and Test: Adjust styling and test the functionality to ensure it works smoothly.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘homepage’ is closed to new replies.