Feedspress

Overriding a local_link into a permalink

By May 14, 2020No Comments

The feeds that appear in the footer areas on many websites that Earnware manages (like Sponsored Stories and Local Articles) need to link to a {local_link} or to a {permalink}. For all the footers we usually use the template=”4″, that has the {local_link} in the template by default. It’s ok to use it, when you want to show off an external source feed, but what to do when you want to show a local feed using template=”4″ that has the {local_link} by default?

So Sponsored Stories Feed shortcode (the external feed) has nothing fancy in it, we covered most of these parameters here:
[feedspress url="https://www.feedspress.com/category/os-esoteric-1/feed/?e301765ae3c4a6059bc7763a07bf7fa8" title_override="" skip_items="" item_fields="title,content" feed_fields="content" allowed_tags="" link_item_title="0" template="4" article_detail_template="3" change_to_local_link="true" detail_page="specials" order="random" max_items="3" class_prefix="feedspress" truncate_description="1" ignore_filter="true"]

For local articles (using template=”4″ parameter that has {local_link} by default) we would need to change the shortcode to the following:
[feedspress url="https://www.ascendhealthy.com/category/feeling-good/feed/" item_fields="title,content" feed_fields="content" template="4" order="random" max_items="3" change_to_local_link="false" wrap_image_with_link="true"]

In this set-up, we override the template #4 {local_link} with a permalink, by changing the local link to “false” (which makes the {local_link} a permalink): change_to_local_link=”false”. After you change this, the image will no longer be wrapped around a link, to fix this please add wrap_image_with_link=”true”, so the image would be wrapped inside an <a> tag.

Also since the feed items link to local articles you don’t need the following parameters (used to specify the feed item detail and category pages with the detail page template parameter): article_detail_template=”3″ change_to_local_link=”true” detail_page=”specials”;