• Resolved richardfromnz

    (@richardfromnz)


    Hi Guido. Thanks for this excellent plugin. Would you be interested in making a tweak to this plugin please for a fee? I’d like it recognise the following kind of code, so that when posts are listed, post titles that have been tagged with a specific tag, show a specified suffix:

    function add_suffix_to_title( $the_title ) {
        if ( has_tag( 'freecontent' ) ) {
            $the_title .= ' - <span class="freecontent">Free</span>';
        }
        return $the_title;
    }
    add_filter( 'the_title', 'add_suffix_to_title' );

    Please let me know. Thanks.

    P.S. I have added this code to my theme’s functions.php file, but the suffix isn’t showing when I’m listing posts on a summary page using VS Knowledge Base.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Guido

    (@guido07111975)

    Hi Richard,

    I will take a look at this upcoming weekend, maybe this is possible without much work.

    Guido

    Plugin Author Guido

    (@guido07111975)

    Hi again,

    It’s not possible without changing plugin itself. My plugin does not use function the_title() and therefore you cannot hook into this.

    For this you must change plugin file vskb-template.

    Look for string that starts with:

    $output .= '<a href="'.get_permalink

    Replace with:

    if ( has_tag( 'freecontent', $single_post->ID ) ) {
    	$output .= '<a href="'.get_permalink( $single_post->ID ).'" rel="bookmark" title="'.esc_attr($title).'">'.esc_attr($title).' - <span class="freecontent">Free</span></a>';
    } else {
    	$output .= '<a href="'.get_permalink( $single_post->ID ).'" rel="bookmark" title="'.esc_attr($title).'">'.esc_attr($title).'</a>';
    }

    But in case plugin get an update you need to add this again..

    Guido

    Thread Starter richardfromnz

    (@richardfromnz)

    Hi Guido. Thanks so much for this. It does exactly what I was looking for. I’ve made a donation to your paypal donation address to thank you ?? All the best. Richard.

    Plugin Author Guido

    (@guido07111975)

    Hi Richard,

    You’re welcome and many thanks for your donation, really appreciate this.

    Guido

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Paid modification to plugin’ is closed to new replies.