Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #10517

    Hi

    i know there is an woocommerce extension for that but hey, it costs 50 bucks.

    Investigating the woocommerce-functions.php, around line 1150 i´ve found:

    Code:
    /* Products RSS Feed */
    function woocommerce_products_rss_feed() {
    // Product RSS
    if ( is_post_type_archive( ‘product’ ) || is_singular( ‘product’ ) ) :

    $feed = get_post_type_archive_feed_link( ‘product’ );

    echo ‘<link rel=”alternate” type=”application/rss+xml” title=”‘ . __(‘New products’, ‘woocommerce’) . ‘” href=”‘ . $feed . ‘” />';

    elseif ( is_tax( ‘product_cat’ ) ) :

    $term = get_term_by(‘slug’, get_query_var(‘product_cat’), ‘product_cat’);

    $feed = add_query_arg(‘product_cat’, $term->slug, get_post_type_archive_feed_link( ‘product’ ));

    echo ‘<link rel=”alternate” type=”application/rss+xml” title=”‘ . sprintf(__(‘New products added to %s’, ‘woocommerce’), urlencode($term->name)) . ‘” href=”‘ . $feed . ‘” />';

    elseif ( is_tax( ‘product_tag’ ) ) :

    $term = get_term_by(‘slug’, get_query_var(‘product_tag’), ‘product_tag’);

    $feed = add_query_arg(‘product_tag’, $term->slug, get_post_type_archive_feed_link( ‘product’ ));

    echo ‘<link rel=”alternate” type=”application/rss+xml” title=”‘ . sprintf(__(‘New products tagged %s’, ‘woocommerce’), urlencode($term->name)) . ‘” href=”‘ . $feed . ‘” />';

    endif;
    }

    but i have no idea how to use it. Any hook, clue or tip on how to get products spotted on my regular wp feed?

    thanks

    #68341

    Hey stickFinger,

    I’m not sure about that. One of the other support crew might have an idea but its a bit out of our scope to modify the core WooCommerce files like that :)

    I’ll leave the topic open in case someone else has some ideas or wants to contribute.

    #68342

    Thanks Devin

    Regarding the “a bit out of our scope” I agree with you but whi knows if someone around here don´t have some light.

    I must say that the open forum at woocommerce sometimes takes lots of time to answer…..

    Thank you

    #68343

    Hey!

    Maybe this thread will help you: https://github.com/woothemes/woocommerce/issues/118 – it seems like woocommerce generates its own feed.

    Regards,

    Peter

    #68344

    Hi Dude

    Thanks for your input ;-)

    Funny that there is not any tip on how to get spotted through the regular wp feed , neither any config on woocommerce admin…

    It seems that “site/feed/?post_type=product” do the trick. But HOW???

    Appending the ?post_type=product on my test site works very well, so i guess that´s not a problem with registered custom post types

    II´ll try to dig a bit further……..

    Thanks and regards

    #68345

    Hey!

    I will open this one again, in case anyone wants to shrare new insights ;)

    Regards,

    Kriesi

    #68346

    Hi stickFinger,

    I’m glad Peter could point you in the right direction :)

    I’ll leave the thread open in case someone else does have some additional information to offer.

Viewing 7 posts - 1 through 7 (of 7 total)

The topic ‘is there a way of show woocommerce products in rss feeds?’ is closed to new replies.