Home › Forums › Themes Support › Pangja › Change Testimonials link
Tagged: testimonial slider, slug
- This topic has 12 replies, 2 voices, and was last updated 2 years, 4 months ago by
admin.
-
AuthorPosts
-
February 15, 2020 at 9:59 am #4697
Hello,
How can I change the link testimonials ?
(see attached screenshot)
Thanks in advance for your help,
Regards,
AlexAttachments:
You must be logged in to view attached files.February 15, 2020 at 10:07 am #4699Plus, I was wondering if it’s possible to run the slides automaticaly ?
Without clicking on arrow buttons.Regards,
AlexFebruary 16, 2020 at 4:27 am #4700Hi,
Thanks for contacting us and choosing our product!
About this issue you can change post type slug follow this topic: https://harutheme.com/forums/topic/how-to-change-post-type-slug-in-harutheme/
About second issue now your site can’t access: https://prnt.sc/r2yevd
Please check it and take screenshot where do you want autoplay.
We’ll check it for you!****
Regards,
HaruThemeFebruary 18, 2020 at 8:50 pm #4716Hi,
I’ve tried but it doesn’t work as I want.
My site is open so you can access. Please try again.What I want exactly, is to remove “Haru” from the link.
How can I do that ?
Also, I’d like the testimonial slider runs automatically.
Thanks in advance.
Regards-
This reply was modified 2 years, 4 months ago by
Alexsandros.
Attachments:
You must be logged in to view attached files.February 19, 2020 at 1:48 am #4719Hi,
1. Sorry but other customer can change it follow our topic tutorial. Please read it carefully and you need re-save Permalink settings.
You are wrong at step 2 and it doesn’t work.
https://harutheme.com/wp-content/uploads/2019/01/posttype-video.png
2. About testimonial autoplay you can set it in Slide Settings tab like this:
https://prnt.sc/r4cjmz
Hope this help!******
Regards,
HaruThemeFebruary 19, 2020 at 9:23 am #4748Hi,
1. O followed the tutorial, but I don’t have the video.php file, only the testimonial.php file.
I guess this is the one that I have to modify ?
If yes, what do I need to modify exactly ?
because it’s different file than the video.php(please see screenshots attached)
2. Thank you very much!
Regards,
AlexAttachments:
You must be logged in to view attached files.February 19, 2020 at 2:33 pm #4753Hi,
We have just checked again and have something wrong here:
You need move this code from $labels to $args:'rewrite' => array( 'slug' => 'testimonial', 'with_front' => false ),
It will become like this:
$args = array( 'labels' => $labels, 'description' => esc_html__( 'Display client\'s testimonials', 'haru-pangja' ), 'supports' => array( 'title', 'editor', 'thumbnail' ), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_icon' => 'dashicons-id', 'menu_position' => 5, 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'capability_type' => 'post', 'rewrite' => array( 'slug' => 'testimonial', 'with_front' => false ) , ); register_post_type( 'haru_testimonial', $args );
Hope this help!
****
Regards,
HaruTheme-
This reply was modified 2 years, 4 months ago by
admin.
February 19, 2020 at 3:28 pm #4756Hi,
Thanks,
There is something wrong.Message alert says :
Impossible to connect to backend.
Backend not found.Please see attached screenshot.
Regards,
AlexAttachments:
You must be logged in to view attached files.February 19, 2020 at 3:31 pm #4758That’s seem you copy wrong syntax.
We’ll post all code in file here and update in next version:<?php /** * @package HaruTheme/Haru Pangja * @version 1.0.0 * @author Administrator <admin@harutheme.com> * @copyright Copyright (c) 2017, HaruTheme * @license http://opensource.org/licenses/gpl-2.0.php GPL v2 or later * @link http://harutheme.com */ if ( !class_exists( 'Haru_Testimonial_Post_Type' ) ) { class Haru_Testimonial_Post_Type { protected $prefix; public function __construct() { $this->prefix = 'haru_testimonial'; add_action('init', array($this,'haru_testimonial')); add_action('admin_init', array($this, 'haru_register_meta_boxes')); if( is_admin() ) { add_action( 'do_meta_boxes', array( $this, 'remove_plugin_metaboxes' ) ); // Add custom columns reference: http://code.tuharulus.com/articles/add-a-custom-column-in-posts-and-custom-post-types-admin-screen--wp-24934 add_filter( 'manage_haru_testimonial_posts_columns', array( $this, 'add_columns' ) ); add_action( 'manage_haru_testimonial_posts_custom_column', array( $this, 'set_columns_value'), 10, 2); } } function remove_plugin_metaboxes() { remove_meta_box( 'mymetabox_revslider_0', 'haru_testimonial', 'normal' ); remove_meta_box( 'handlediv', 'haru_testimonial', 'normal' ); remove_meta_box( 'commentsdiv', 'haru_testimonial', 'normal' ); } function haru_testimonial() { $labels = array( 'name' => esc_html__( 'Testimonials', 'haru-pangja' ), 'singular_name' => esc_html__( 'Testimonial', 'haru-pangja' ), 'menu_name' => esc_html__( 'Testimonials', 'haru-pangja' ), 'add_new' => esc_html__( 'Add New', 'haru-pangja' ) , 'add_new_item' => esc_html__( 'Add New Testimonial', 'haru-pangja' ) , 'edit_item' => esc_html__( 'Edit Testimonial', 'haru-pangja' ) , 'new_item' => esc_html__( 'Add New Testimonial', 'haru-pangja' ) , 'view_item' => esc_html__( 'View Testimonial', 'haru-pangja' ) , 'search_items' => esc_html__( 'Search Testimonial', 'haru-pangja' ) , 'not_found' => esc_html__( 'No Testimonial items found', 'haru-pangja' ) , 'not_found_in_trash' => esc_html__( 'No Testimonial items found in trash', 'haru-pangja' ) , 'parent_item_colon' => '', ); $args = array( 'labels' => $labels, 'description' => esc_html__( 'Display client\'s testimonials', 'haru-pangja' ), 'supports' => array( 'title', 'editor', 'thumbnail' ), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'menu_icon' => 'dashicons-id', 'menu_position' => 5, 'show_in_admin_bar' => true, 'show_in_nav_menus' => true, 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'capability_type' => 'post', 'rewrite' => array( 'slug' => 'testimonial', 'with_front' => false ) , ); register_post_type( 'haru_testimonial', $args ); // Register a taxonomy for Testimonials Categories. $category_labels = array( 'name' => esc_html__( 'Testimonial Categories', 'haru-pangja' ) , 'singular_name' => esc_html__( 'Testimonial Category', 'haru-pangja') , 'menu_name' => esc_html__( 'Categories', 'haru-pangja' ) , 'all_items' => esc_html__( 'All Testimonial Categories', 'haru-pangja' ) , 'edit_item' => esc_html__( 'Edit Testimonial Category', 'haru-pangja' ) , 'view_item' => esc_html__( 'View Testimonial Category', 'haru-pangja' ) , 'update_item' => esc_html__( 'Update Testimonial Category', 'haru-pangja' ) , 'add_new_item' => esc_html__( 'Add New Testimonial Category', 'haru-pangja' ) , 'new_item_name' => esc_html__( 'New Testimonial Category Name', 'haru-pangja' ) , 'parent_item' => esc_html__( 'Parent Testimonial Category', 'haru-pangja' ) , 'parent_item_colon' => esc_html__( 'Parent Testimonial Category:', 'haru-pangja' ) , 'search_items' => esc_html__( 'Search Testimonial Categories', 'haru-pangja' ) , 'popular_items' => esc_html__( 'Popular Testimonial Categories', 'haru-pangja') , 'separate_items_with_commas' => esc_html__( 'Separate Testimonial Categories with commas', 'haru-pangja' ) , 'add_or_remove_items' => esc_html__( 'Add or remove Testimonial Categories', 'haru-pangja' ) , 'choose_from_most_used' => esc_html__( 'Choose from the most used Testimonial Categories', 'haru-pangja' ) , 'not_found' => esc_html__( 'No Testimonial Categories found', 'haru-pangja' ) , ); $category_args = array( 'labels' => $category_labels, 'public' => false, 'show_ui' => true, 'show_in_nav_menus' => false, 'show_tagcloud' => false, 'show_admin_column' => false, 'hierarchical' => true, 'query_var' => true, 'rewrite' => array( 'slug' => 'category', 'with_front' => false ) , ); register_taxonomy('testimonial_category', array( 'haru_testimonial' ) , $category_args); } // Add columns to Testimonial function add_columns($columns) { unset( $columns['cb'], $columns['title'], $columns['date'] ); $cols = array_merge(array('cb' => ('')), $columns); $cols = array_merge($cols, array('title' => esc_html__( 'Name', 'haru-pangja' ))); $cols = array_merge($cols, array('category' => esc_html__( 'Category', 'haru-pangja' ))); $cols = array_merge($cols, array('thumbnail' => esc_html__( 'Picture', 'haru-pangja' ))); $cols = array_merge($cols, array('date' => esc_html__( 'Date', 'haru-pangja' ))); return $cols; } // Set values for columns function set_columns_value($column, $post_id) { $prefix = $this->prefix; switch ($column) { case 'id': { echo wp_kses_post($post_id); break; } case 'category': { $terms = get_the_terms( $post_id, 'testimonial_category' ); if ( $terms && ! is_wp_error( $terms ) ) { $term_links = array(); foreach($terms as $term) { $term_links[] = $term->name; } echo join( ", ", $term_links ); } break; } case 'thumbnail': { echo get_the_post_thumbnail($post_id, 'thumbnail'); break; } } } // Register metaboxies function haru_register_meta_boxes() { $prefix = $this->prefix; $meta_boxes = array(); $meta_boxes[] = array( 'id' => "{$prefix}_meta_boxes", 'title' => esc_html__( 'Testimonial Information:', 'haru-pangja' ), 'post_types' => array( 'haru_testimonial' ), 'fields' => array( array( 'id' => "{$prefix}_position", 'name' => esc_html__( 'Position', 'haru-pangja' ), 'type' => 'text', ), array( 'name' => esc_html__( 'Rating', 'haru-pangja' ), 'id' => "{$prefix}_rating", 'type' => 'select', 'options' => array( '1' => esc_html__( '1 Star', 'haru-pangja' ), '2' => esc_html__( '2 Stars', 'haru-pangja' ), '3' => esc_html__( '3 Stars', 'haru-pangja' ), '4' => esc_html__( '4 Stars', 'haru-pangja' ), '5' => esc_html__( '5 Stars', 'haru-pangja' ), ), 'multiple' => false, 'std' => '1', 'placeholder' => esc_html__( 'Select Rating', 'haru-pangja' ), ), ) ); // Use RW Metaboxies fields if ( class_exists('RW_Meta_Box') ) { foreach ($meta_boxes as $meta_box) { new RW_Meta_Box($meta_box); } } } } new Haru_Testimonial_Post_Type; }
Hope this help!
***
Regards,
HaruThemeFebruary 20, 2020 at 3:51 pm #4781Hello,
Thank you, I copied the entire code you provided, but still doesn’t work… :/
See screenshot attached.
Regards
Attachments:
You must be logged in to view attached files.February 20, 2020 at 3:58 pm #4783If you cannot edit file you should contact your hosting provider about file permission.
Because this code is working fine on our dev site and demo site.
We’ll update new version asap.****
Regards,
HaruThemeFebruary 20, 2020 at 4:24 pm #4785Ok, sure I will, thanks
What do you mean update new version ?
February 21, 2020 at 1:04 am #4789Hi,
We’ll update to fix this bug in next version.****
Regards,
HaruTheme -
This reply was modified 2 years, 4 months ago by
-
AuthorPosts
You must be logged in to reply to this topic.