[Resolved] Selectively disable title link

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Selectively disable title link

This topic contains 5 replies, has 3 voices, and was last updated by  Tom 3 months, 2 weeks ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #5023

    Jamal
    Participant

    Hi

    Anybody know how to selectively disable title link by targeting specific list id? Tried this

    //Disable wpsp title link
    add_filter( 'wpsp_disable_title_link', 'jam_no_title_link' );
    function jam_no_title_link()
    { 
      if ( 4911 == $settings[ 'list_id' ] ) {
        return 'true';
      }
      
    }
    #5031

    Tom
    Keymaster

    Try this:

    add_filter( 'wpsp_disable_image_link', 'tu_disable_links', 10, 2 );
    add_filter( 'wpsp_disable_title_link', 'tu_disable_links', 10, 2 );
    function tu_disable_links( $output, $settings ) {
        if ( 177 === $settings['list_id'] ) {
            return true;
        }
    
        return $output;
    }
    #5041

    Jamal
    Participant

    You are simply unbelievable ! Thanks so much

    #5047

    Tom
    Keymaster

    You’re welcome 🙂

    #8106

    William
    Participant

    Instead of disabling, is there a way to use a custom field to link to? I would like to link to the post’s ACF custom field – file_upload instead; so that I can link directly to a PDF for press release listings.

    #8114

    Tom
    Keymaster

    Hi there,

    As of right now that’s not possible, but I like the idea. I’ll implement a filter in the next version 🙂

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.