Adding custom fields to wp-o-matic
Reported by thebigkrumm | January 17th, 2010 @ 08:07 PM
Good evening!
I've been scratching my head all day long trying to figure out how to grab custom fields in my RSS feed and implement it through wp-o-matic; specifically I'd like to grab the "link" field [eg <link><![CDATA[http://idx.diversesolutions.com/search/2087/24/1476336]]> </link> and add it to my post in a specific location. How can I do this? I can't figure out where WP-o-Matic grabs the feed from which it gets the title and content. I would really like to be able to assign it to a PHP variable for further manipulation.
Thanks!
thebigkrumm
Comments and changes to this ticket
-
Ricardo Rauch April 15th, 2010 @ 08:50 AM
- Assigned user changed from Guillermo Rauch to Ricardo Rauch
-
KBruno May 5th, 2010 @ 03:19 PM
hi thebigkrumm,
I don't know if you're still wondering... In that feed you should be able to use the {permalink} tag in the "Options>>Custom post template" (be sure to turn on the check box). It can't be inserted into the middle of the {content} eaisily but can be formatted in any way before or after.
Other fields can be parsed in simplepie (get_description, get_thumbnail, get_link etc.) by adding them to the // Template parse in wpomatic.php.Ex.: add {description} to the '$vars = array(' and
add '$item->get_enclosure(0)->get_description()' to the '$replace = array('
(same position in both arrays) & just use the {description} tag in "Options>>Custom post template".If I remember right it'll cause an error if the feed doesn't have the tag you targeted so I added a complete Template for specific domains like
'if(strpos($feed->url, 'whateverdomain.com')) {' for the domain I want parsed differently and an else statement for the standard Template avoids any errors.
Be nice if the "Custom post template" had a place for adding non standard tags to parse in a campaign but that would be a lot of work & I just fix what I need as I go. Maybe that's upcomming...
Karl :-)
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
WP-o-Matic project.