I need to a make a custom RSS template for my website and I'm having problems getting substr(the_title_rss(), 0, strpos(the_title_rss(), ' —'));
to work on the RSS feed.
What the above code is suppose to do is if a title has -
in the title, it removes everything after the -
.
I think the best way to solve my problem is to run substr
and strpos
and save the title in a custom field. I'm not a programmer so has anyone been able to accomplish this or point me in the right direction?
Thanks,