WordPress.org

Ready to get started?Download WordPress

Forums

TBTestimonials
[resolved] Shortcode conflict ? and 404 preview error (6 posts)

  1. MrJLC
    Member
    Posted 1 year ago #

    Hi, great little plugin this is, however I can only get it to work in a plain vanilla wordpress installation thats uses twenty-eleven theme.

    On my other wordpress installation that uses a downloaded theme from elsewhere, the shortcode [testimonial] is perhaps conflicting with a shortcode within the theme, so, how can I go about changing the shortcode name, to perhaps [tb_testimonial] instead ? Ive tried editing the following line within tb-testimonials.php, but it has no effect.

    add_shortcode( 'testimonial', array( &$this, 'shortcode' ) );

    When I create a new page and add the shortcode to it within the WYSIWYG editor, and preview the page, it merely shows the shortcode code so its not hooking up.

    Also, within the testimonials admin area, when I want to preview a testimonial, Im getting a 404 error. I have permalinks switched on and am using the Post name setting (/%postname%)

    Any info much appreciated

    http://wordpress.org/extend/plugins/tb-testimonials/

  2. Michael Cannon
    Member
    Posted 1 year ago #

  3. Travis Ballard
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks Michael!

  4. Travis Ballard
    Member
    Plugin Author

    Posted 1 year ago #

    I'm thinking I need to add a filter to the shortcode so that if this is an issue we can change it easily via a user's functions.php. Look for that in the next version. I'm a little tied up at the moment so I don't exactly when the next version will be released but know that this will find it's way into it.

  5. Travis Ballard
    Member
    Plugin Author

    Posted 1 year ago #

    Filter added to GitHub repo you can download the patched version here https://github.com/TravisBallard/TBTestimonials/zipball/master and view the changes here https://github.com/TravisBallard/TBTestimonials/commit/1301055e609128c955e0b8947d3dd03d545c24d5

    After you switch over to the patched version you can put this in your functions.php to change the shortcode.

    add_filter( 'tbt_testimonial_shortcode', create_function( '', 'return "tbtestimonial";' ) );

    Thanks,
    Travis

  6. Travis Ballard
    Member
    Plugin Author

    Posted 1 year ago #

    Filters added for shortcode and post type in version 1.6.5

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic