[Resolved] Different styling for first returned feed item and integration with Haiku
First of all I have to say that the functionality of this plugin ‘out of the box’ is quite excellent 🙂
However, I am bringing in an iTunes feed for a site I am working on at the moment and would like to be able to style the top returned entry slightly differently to the rest of the entries (in this case the Number 1 song to have a different background colour as a minimum) and am wondering how I might be able to achieve this. I can see that I can drop in a hardcoded list item tag in hungryfeed.php before the $template_html and $rss_values are retrieved, but I’m afraid that I’m not proficient enough with PHP at the moment to know how to action an if/else statement based on the number of the record, so at the moment I only have
echo "<li class=\"song-info-holder\">\n"; echo hungryfeed_merge_template($template_html,$rss_values); echo "</li>\n";
Any pointers with this would be much appreciated.
I would also like to integrate Haiku player with this in order to replace the enclosure links with the Haiku player. I have amended the Haiku code to work with the .m4a file extension and swap that out, but Haiku will not dynamically replace links unless they are within the content and does not work with replacing HTML generated within HungryFEED. As I cannot drop in the shortcode for Haiku into the HungryFEED templates as far as I am aware I was therefore looking at again hardcoding something in. Something along the lines of
echo do_shortcode('[haiku url=]');
Unfortunately I don’t (again!) know enough about how this works to be able to bring in the value of the url from $enclosure_link, so any help would appreciated with this too.
I understand that this is all a bit of a big ask, but I have looked around quite extensively and cannot seem to find any articles that would enable me to answer my own questions on this occasion.
Thanks in advance for any help that anyone may be able to provide me with.
- The topic ‘[Resolved] Different styling for first returned feed item and integration with Haiku’ is closed to new replies.