Links on text of slider - modify slider.php for child theme

Hello,

I would like to put links on sliders title and sub-titles.

I found another thread explaining to modify inc/slider.php and add htmlspecialchars_decode

But when i copy slider.php in sydney-child/inc/slider.php, and apply my changes there, it doesn’t work.

Did I do anything wrong ? Or WP child theme don’t accept this ?

Hello @will7914,

Can you please provide a link to your website and describe what exactly you want to achieve?

Kind Regards, Roman.

Hello Roman,

I’m sorry, i’m for now testing Sydney theme on a computer of my LAN, with no access from outside.

What I want is to create a link on the title and subtitle of nomepage sliders.

if I put for example :
Ready to begin your journey?

I see the HTML tags appear.

So, I found it’s possible by adding htmlspecialchars_decode() on title and sutitles in inc/slider.php

I wanted to do it in my child theme, to avoid slider.php be modified when doing themes updates.

But it seems wordpress doesn’t manage child theme files in inc/ folder…

Hello @will7914,

You can override PHP functions, please check this tutorial:

You can use Code Snippets plugin instead of child theme functions.php file.

Kind Regards, Roman.

Hello Roman,

Thank you, overriding worked. Thanks a lot !

You are welcome @will7914! :slight_smile:

Kind Regards, Roman.