Step 3 in optimizing your RSS pages and posts with CaRP include tweaking the code entries for displaying RSS feeds in your WordPress pages.
Review Steps 1 and 2 for Displaying RSS in your WordPress pages and posts and setting up the code for showing feed in your posts.
Note: You will need the RSS to HTML script for the examples below to work.
In between the opening and closing tags, enter your options
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | // show up to 3 items CarpConf('maxitems',3); // set up cache interval: refresh every 4 hours CarpConf('cacheinterval',240); // or refresh every hour CarpConf('cacheinterval',60); // show up to 80 characters from the item description CarpConf('maxidesc',80); // remove the powered by text CarpConf('poweredby',''); Good start, modify at will. Now what to display // only show the item link CarpConf('iorder','link'); // or show everything CarpConf('iorder','image,link,date,author,desc'); // or show everything CarpConf('iorder','image,link,date,author,desc'); What about the actual link? // Link target // 0 (default): the current window // 1: a new window CarpConf('linktarget',1); //Code for WordPress plugin example maxitems=3 cacheinterval=120 maxidesc=80 poweredby= linktarget=1 |
And more variations can be done as well - have fun!
Super article! Your writing is so much better in comparison to most other bloggers. Thank you for posting when you get the chance to, I’ll be sure to subscribe!