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 using wordpress in my magento using Fishpig wordpress extension, i have created a functions in functions.php of my theme (though its full integrated, meaning magento theme is applied to blog) but the following function doesn't seem to have any effort. my function is

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;
    }

is it because feed by default loads the rss and rss doesn't run the mentioned code? Edit: i am using this Fishpig extension

share|improve this question
    
Function by itself doesn't tell us much. How precisely are you using it? You seem to have quite a peculiar setup there. –  Rarst Sep 17 '13 at 12:46
    
@Rarst why is it peculiar? i am using it on rss feed. the function is self explanatory itself –  Nofel Sep 17 '13 at 12:52
    
Because WordPress inside Magento is not exactly typical setup. :) Function shows what it does, you are have not provided info how you are using the function. Which is likely the part where something goes wrong or you wouldn't have the issue with it. –  Rarst Sep 17 '13 at 12:54
    
@Rarst i am using Fishpig magento wordpress integration, i am using it in my wordpress theme function. and when i call feed/ i want it to work. –  Nofel Sep 17 '13 at 13:16
    
What is "fishpig magento integration"? Please link to relevant plugins/themes (?) in your question. –  Rarst Sep 17 '13 at 13:19

1 Answer 1

up vote 0 down vote accepted

I believe Fishpig doesn't use your theme's functions.php file when in the "Fully Integrated" mode, it has a built-in theme that it forces WordPress to use.

You will have to either modify the Fishpig source code and/or ask Fishpig support how you can do this without affecting future upgrades.

share|improve this answer
    
I found a link which tells you how to get what i want,but there is no recent_entries.html i can find. There support haven't replied me yet. any idea on how can i? –  Nofel Sep 17 '13 at 14:28
    
Doesn't look like that article applies to Fishpig, but instead to other WordPress-Magento integration solution. Sorry but you might be better off asking the community at magento.stackexchange.com, since people will probably not know Fishpig here. –  guidod Sep 18 '13 at 15:23
    
yes,but now i realized i have to make something in magento that can target the feed on wordpress. i don't know what magento uses,functions or what. i would appreciate if i have someone help me with creating function for magento that do what i want. –  Nofel Sep 18 '13 at 18:24

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.