• Resolved foobarph

    (@foobarph)


    hi there,

    how can i enable to sell all my existing posts?

    is there an option or mysql statement that I should execute?

    because, what I’m doing is i am configuring my posts one by one, which is time consuming. i have at least 900 posts to configure. T_T

    any help would be highly appreciated.

    cheers!

    https://wordpress.org/plugins/mycred/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author myCred

    (@designbymerovingi)

    Hi.

    Here is a code snippet that will do this using a shortcode.

    Install

    1. Copy the code into your theme’s functions.php file.
    2. Create a new page that you set to be “Private” to restrict regular users from seeing it.
    3. Insert the [sell_all_posts] shortcode into this page and save.
    4. View this page and select the post type you want to set for sale.
    5. Enter the price or leave the field empty to use your default settings.
    6. Enter the button label or leave the field empty to use your default settings.
    7. Enter an expiration or leave the field empty to use your default settings.
    8. Click Run
    9. Done!

    Now your default settings you can find on your myCRED > Settings page under “Sell Content”. Any field that is left empty will be populated by these settings.

    Once you click run, depending on the number of posts to set for sale this process may take a few seconds so please be patient.

    Once completed, ALL posts of the particular type will be immediately set for sale.
    Remember that post author will always see their own content and admins will see ALL content.

    Finally the shortcode will only set posts for sale that are “Published” so private posts or trashed posts will not be set for sale. Once you have run the shortcode and you are finished please delete the page and shortcode to prevent abuse.

    Thread Starter foobarph

    (@foobarph)

    Works great Gabriel!

    A total of 2115 posts were successfull set for sale.

    Last request, I hope you can have a selection per “category” as well.

    But this will do for now.

    Cheers! 🙂

    Plugin Author myCred

    (@designbymerovingi)

    Hey.

    That would require a new code since we would need to take into account categories.

    Here is a new custom shortcode. Works just like the previous one but the shortcode is called sell_posts_of_category (to avoid confusion) and will only work for Posts.

    Same install as before but now you will see a dropdown for your categories.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘how to sell all existing contents?’ is closed to new replies.