1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Wordpress woocommerce product rss feed

Discussion in 'WordPress' started by pakitonline, Sep 29, 2014.

  1. #1
    hi any body

    I setup online shop website using wordpress woocommerce plugin and now my client need newsletter option on website.. his requirement when he add new product auto email send to his subscribers emails i now about feed burner but for this service rss feed is important and my website domain.com/feed not show products.. plz help me how to make product rss feed or any other good and free service available plz tell me Thanks i am waiting

    Thanks

    Hafeez Baig
     
    pakitonline, Sep 29, 2014 IP
  2. Hefaistos

    Hefaistos Active Member

    Messages:
    194
    Likes Received:
    14
    Best Answers:
    9
    Trophy Points:
    63
    Digital Goods:
    1
    #2
    WooCommerce uses a custom post type for products ( product ). By default, custom post types are not included in WordPress feed.
    The function below should include any post type in feed. Just make sure to include the custom post type name inside that array.

    
    // Ad custom post types to Rss feed
    function cpt_to_feed( $args ) {
        if ( isset( $args['feed'] ) && !isset( $args['post_type'] ) )
            $args['post_type'] = array('post', 'page', 'product');
        return $args;
    }
    add_filter( 'request', 'cpt_to_feed' );
    
    PHP:
    However, I haven't tested it with WooCommerce.

    Also, you should be able to find the shop rss feed at:

    example.com/feed/?post_type=product
     
    Last edited: Sep 29, 2014
    Hefaistos, Sep 29, 2014 IP