Removing links

Hi there,

I’m looking for a way to show only pictures, tittle and text in my latest news widget on the homepage, without links to a post page.

Any ideas how to delete the link?

Thanks

Hello Asega,

You can try to do this with jQuery.

  1. Please install and activate Insert Headers and Footers plugin that will allow you to insert JavaScript (jQuery) code.

  2. Go to your DashboardSettingsInsert Headers and Footers → add the following code to Scripts in Header section, and click Save button.

<script type='text/javascript'>
    jQuery(document).ready(function(){
        jQuery('.widget_perth_latest_news .blog-post a').removeAttr('href');
    });
</script>

Please feel free to ask any other questions that you might have.

Kind Regards, Roman.

Hi Roman,
I inserted the code you referenced to eliminate news entries linking to post pages but it didn’t work for me. Can you take a look at my site at www.triton-mfg.com

Thank you,
Megan

Hello Megan,

You are using Sydney Pro theme. The code above is for Perth theme, that’s why it’s not working on your website.

Please try to use this code instead:

<script>
    jQuery(document).ready(function(){
        jQuery('.widget_sydney_latest_news .blog-post a, .widget_sydney_latest_news_type_b .blog-post a').removeAttr('href');
    });
</script>

Kind Regards, Roman.

Ooh, sorry. I should’ve seen that! Thank you.

You are welcome Megan! And have a nice day :slight_smile:

Kind Regards, Roman.