Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am new to magento and what i have magento wordpress by figpig installed.After much research i found that wordpress functions won't work in magento. As my function was placed in theme folder, which would display thumbnails in rss as well as turn hyperlinks in post.

As i am new to magento, i want to convert the following function to make it work and where to use it? I already have it wordpress function.

    add_filter( 'the_excerpt_rss', 'insert_thumbnail_into_feed' );
add_filter( 'the_content_feed', 'insert_thumbnail_into_feed' );


function insert_thumbnail_into_feed() {
    global $post;
    if ( has_post_thumbnail( $post->ID ) ){
        // replace thumbnail with yours
        $content = '<p>' .get_the_post_thumbnail( $post->ID, 'thumbnail' ) .'</p>';
    }

    // get post content and replace feed content with
    // you can also limit/filter the content to exclude shortcodes and html code etc.
    $content .= '<p>' .get_the_content() .'</p>';

    return $content;
}

also if someone can point me in right direction to learn about magento development wise.

share|improve this question

migrated from magento.stackexchange.com Sep 19 '13 at 18:38

This question came from our site for users of the Magento e-Commerce platform.

    
The OP has a function that is working in WP context, needs conversion to fit magento and they migrate it here??? –  Johannes Pille Sep 19 '13 at 18:52
    
What exactly are you trying to achieve within Magento itself. You mention RSS. Are you trying the modify a Magento specific RSS feed? Maybe you should post some exact examples of what you're trying to achieve. –  Axel Sep 19 '13 at 19:02
    
@Axel i want to modify wordpress rss to display thumbnails of posts and hyper links in the post, i am using fishpig's magento wordpress integration. I read somewhere that when you have fully integrated magento wordpress, it will take over wordpress functions and functions of wordpress won't work. so as i am unfamiliar with magento, i want something in magento that can modify my rss feed to display thumbnails and hyperlink. –  Nofel Sep 19 '13 at 21:28
    
i want to modify wordpress rss to display thumbnails of posts and hyper links in the post - Why are you trying to modify Magento, when you are trying to change the Wordpress RSS? What you are trying to do doesn't make sense. The purpose the Fishpig integration is to make the user experience between the two platforms seamless. You develop the two systems independently, them combine them together using the plugin. Are you trying to get Wordpress data inside of a Magento RSS feed, or vice versa? Again, post an exact example detailing what you want from Magento, and what you want from WP. –  Axel Sep 19 '13 at 21:56
    
@Axel this has my rss. i want it to display thumbnails of post and hyperlink in the post. the function i posted above works only on wordpress but not in magento. so that is what i want to work. –  Nofel Sep 19 '13 at 22:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.