WordPress.org

Forums

eShop
[resolved] [closed] Adding to Custom Posts (9 posts)

  1. aunrea
    Member
    Posted 4 years ago #

    Is there a way to have custom post types have products added to them? Or will it only work with regular posts?

  2. elfin
    Moderator
    Plugin Author

    Posted 4 years ago #

    can be done via a small plugin, just add a filter to: eshop_post_types
    it contains an array, so either add to or replace it.

  3. aunrea
    Member
    Posted 4 years ago #

    THANKS! That did it!

  4. aunrea
    Member
    Posted 4 years ago #

    Now how do I get eshop custom fields to shop in my custom post type admin area? I have the code below but it doesn't work:

    [Code moderated as per the Forum Rules. Please use the pastebin]

  5. Stelios Sbyrakis
    Member
    Posted 4 years ago #

    Hi, can you direct me where to add the eshop_post_types filter?

  6. aunrea
    Member
    Posted 4 years ago #

    It is in the file eshop-product-entry.php near the top.
    change:
    $array=array('post', 'page');

  7. elfin
    Moderator
    Plugin Author

    Posted 4 years ago #

    no you don't need to do that at all.

    you create a filter for the eshop_post_types array, and add it in there. there is no need to edit eShop core files.

  8. qubestream
    Member
    Posted 3 years ago #

    Rich,
    Could you post an example snippet for adding a custom post type filter for eshop_post_types?

  9. trothmaster
    Member
    Posted 3 years ago #

    http://quirm.net/forum/topic.php?id=2850

    that page shows how to do this properly with the filter he was talking about....

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • eShop
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags