Viewing 15 replies - 1 through 15 (of 16 total)
  • Do you mean make the text of the featured pages a link? And the same link of the button?

    Thread Starter apestaartje

    (@apestaartje)

    I want to make multiple hyperlinks on texts above the buttons.

    I’d just have the same question to ask. Has Featured Pages this custom property?

    You can try adding this to your child-theme functions.php

    add_filter('tc_fp_text_sanitize', 'no_sanitize_text', 20, 3);
    function no_sanitize_text($text, $fp_single_id, $fp_id){
        // grab the original text and leave the filter hook on it
        $featured_text = apply_filters( 'tc_fp_text', tc__f( '__get_option' , 'tc_featured_text_'.$fp_single_id ), $fp_single_id, $fp_id );
        // return un-sanitized text with html tags
        return html_entity_decode($featured_text);
    }

    This way you can use html entities in the fp-text.
    Look that this will work just with featured text set in customizr settings, will not work if you use the automatic excerpt of the selected page.

    would it work the same with the title or the featured image?

    Sorry don’t get what do you mean ??
    This is in order to have html entities in featured pages text.
    What do you mean?

    Thread Starter apestaartje

    (@apestaartje)

    Ok, I’ve added this to functions.php (I don’t use a child theme).
    How can I make the hyperlinks now?

    Well you should use a child-theme, otherwise you’ll lose your changes in the functions.php of customizr on every upgrade.
    But it’s up to you.
    What you have to do now is simply put html tags in the featured pages text in customizr settings.
    Something like

    blablabla <a href="https://www.whatever.com"> Go to whatever </a>

    Thread Starter apestaartje

    (@apestaartje)

    Yes, that works, thanks a lot!
    Now it’s my task to limit the 200 available characters of every featured text ??

    Sorry, I intended: what if I want to have the same hyperlink of button on title or image instead of excerpt (text)? Can I use the same code?

    @csingerline, I answered your other post. Please don’t hijack other non-related posts. I do understand your feeling of panic at the moment.

    Unless this was the change you were trying to make?

    (Post has been deleted and moved to another post!)

    Guys this is the topic of apestaartje .
    So. (I thought there was a snippet for this, I couldn’t find it .. :()

    //change fp_text_length
    add_filter('tc_fp_text_length', 'my_fp_length');
    function my_fp_length(){
        return 500;
    }

    Thread Starter apestaartje

    (@apestaartje)

    If you mean I can choose 500 – or less or more – characters I would be happy. Thanks again.

    Yes I meant that, change that 500 to suit your needs, let me know if something goes wrong.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘link featured text homepage’ is closed to new replies.