WordPress.org

Forums

Testimonials by WooThemes
[resolved] archive page - base premalink (4 posts)

  1. Ulrich
    Member
    Posted 2 years ago #

    When I access the page example.com/testimonials I get the archive page of the testimonials. I would like to use the shortcode on the page "Testimonials" but this clashes with the plugin. I have set the permalink to posts name.

    Is there a solution for this.

    http://wordpress.org/extend/plugins/testimonials-by-woothemes/

  2. bizspruiker
    Member
    Posted 2 years ago #

    im having this problem too, its doing my head in! can anyone help?

  3. Amber
    Member
    Posted 2 years ago #

    I just discovered this as well and it was driving me bonkers @_@

    I'm not a huge advocate of editing core code (as updates will break your modifications), however, the line 'has_archive' => 'testimonials', appears to be the issue:
    (found in testimonials-by-woothemes/classes/class-woothemes-testimonials.php)

    $args = array(
    			'labels' => $labels,
    			'public' => true,
    			'publicly_queryable' => true,
    			'show_ui' => true,
    			'show_in_menu' => true,
    			'query_var' => true,
    			'rewrite' => array( 'slug' => 'testimonial' ),
    			'capability_type' => 'post',
    			'has_archive' => 'testimonials',
    			'hierarchical' => false,
    			'supports' => array( 'title', 'editor', 'thumbnail', 'page-attributes' ),
    			'menu_position' => 5,
    			'menu_icon' => ''

    I temporarily commented out the line 'has_archive' => 'testimonials', by changing it to: /*'has_archive' => 'testimonials',*/

    I then re-saved my permalink structure and viola I am now able to use the page 'testimonials'.

  4. Ulrich
    Member
    Posted 2 years ago #

    This is solution will work with version 1.4.1

    Add this php code to the functions.php of your child theme

    /**
     * Changes testimonial archives URL slugs
     */
    function testimonials_archive_slug( $archive_slug ) {
    	$new_archive_slug = _x( 'testimonials-archive', 'post archive url slug', 'woothemes-testimonials' );
    	return $new_archive_slug;
    }
    add_filter( 'woothemes_testimonials_archive_slug', 'testimonials_archive_slug' );

    After adding you will need to resave the permalinks settings to save the new slug.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Testimonials by WooThemes
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic