Forum Replies Created
-
AuthorPosts
-
Makarand ManeSpectatorLooks like your elementor developer was in too hurry to finish it :) Here is my patch https://pastebin.com/FZZuLyeN
From 680925dc9c3147f052a574ad630b40d2f62fc56d Mon Sep 17 00:00:00 2001 From: Makarand Mane <[email protected]> Date: Sun, 31 May 2020 01:23:06 +0530 Subject: [PATCH] Fix sort category by custom order. Added new dropdown for orderby with correct options. Corrected code in callback function --- includes/elementor/widgets/vibe-courseCarousel.php | 12 +++++++++++- metaboxes/library/vibe-editor.php | 5 ++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/includes/elementor/widgets/vibe-courseCarousel.php b/includes/elementor/widgets/vibe-courseCarousel.php index 23a0dd3..3c7ec48 100644 --- a/includes/elementor/widgets/vibe-courseCarousel.php +++ b/includes/elementor/widgets/vibe-courseCarousel.php @@ -85,7 +85,17 @@ if ( ! defined( 'ABSPATH' ) ) { [ 'label' => __('OrderBy', 'vibe-customtypes'), 'type' => \Elementor\Controls_Manager::SELECT, - 'default' => 'rated', + 'default' => 'name', + 'options' => array('name'=>__('Alphabetical', 'vibe-customtypes'),'description'=>__('Description', 'vibe-customtypes'),'meta_value_num'=>__('Custom Order','vibe-customtypes')), + ] + ); + + $this->add_control( + 'order', + [ + 'label' => __('Order', 'vibe-customtypes'), + 'type' => \Elementor\Controls_Manager::SELECT, + 'default' => 'ASC', 'options' => array( 'DESC' => 'Decending', 'ASC' => 'Ascending' diff --git a/metaboxes/library/vibe-editor.php b/metaboxes/library/vibe-editor.php index 1d9af86..c0df8fa 100644 --- a/metaboxes/library/vibe-editor.php +++ b/metaboxes/library/vibe-editor.php @@ -500,7 +500,10 @@ function custom_post_carousel($atts, $content = null) { } if(!empty($atts['orderby'])){ - $args['orderby']='name';$args['order']=$atts['orderby']; + $args['order']= $atts['order']; + $args['orderby']=$atts['orderby']; + if( $atts['orderby'] == 'meta_value_num') + $args['meta_key']= 'course_cat_order'; } if(empty($args['include'])){unset($args['include']);} if(empty($args['orderby'])){unset($args['orderby']);unset($args['order']);unset($args['meta_key']);} -- 2.19.1.windows.1
May 30, 2020 at 12:19 pm in reply to: Sort course category carousel using custom order or ID #264323Makarand ManeSpectatorHi Alex, Addition to last reply,- You already have parameter declared for shortcode called orderby...
- For elementor you added control Order by but options are wrong ('Decending', 'Ascending') Which should be same as required by shortcode Like 'Alphabetical', 'description'& ,'meta_value_num'='Custom Order' & you dont have control named Order for elementor widget, with option ('Decending', 'Ascending') .
- If you add right control & so it work without any hassle. As shortcode already accepts parameter, meta_value_num & can sort by custom order
- I think its mistake in your code & you should fix in next update
$v_modules['taxonomy_carousel'] = array( 'name' => __('Course Category Carousel', 'vibe-customtypes'), 'options' => array( .................................... 'orderby' => array( 'title' => __('Show Direction arrows', 'vibe-customtypes'), 'type' => 'select', 'type' => 'select', 'options' => array('name'=>__('Alphabetical', 'vibe-customtypes'),'description'=>__('Description', 'vibe-customtypes'),'meta_value_num'=>__('Custom Order','vibe-customtypes')), 'std' => 1 ),
vibe-courseCarousel.php Line no 85$this->add_control( 'orderby', [ 'label' => __('OrderBy', 'vibe-customtypes'), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => 'rated', 'options' => array( 'DESC' => 'Decending', 'ASC' => 'Ascending' ), ] );
As you can see above, default parameter & options doesnt match at all. On line no 502, Why you are forcefully replacing orderby & order value?if(!empty($atts['orderby'])){ $args['orderby']='name';$args['order']=$atts['orderby']; }
May 30, 2020 at 10:52 am in reply to: Sort course category carousel using custom order or ID #264304Makarand ManeSpectatorHi Alex- Working with WPLMS since 2014, so well aware about updates
- I am going to modify it using hooks or I will override this function from child theme.
- Can u plz tell me in which function, taxnomy_carousel is called? I checked plugin and theme but didn't found this is used anywhere. I am using elementor builder not vibe builder, so it this same function used by elementor also?
- I saw this shortcode add_shortcode('v_taxonomy_carousel', array($this,'taxonomy_carousel')); But taxonomy_carousel is not used anywhere. Call back for this shortcode is taxonomy_carousel and declared function is taxnomy_carousel. Both are different in spelling.
May 29, 2020 at 12:34 pm in reply to: Sort course category carousel using custom order or ID #264083Makarand ManeSpectatorHello @Jackson Just tell me where is code of this elementor block is located. I will change myselfMakarand ManeSpectatorHi @Alex Which filter function I have to initialize before any file loads ?Makarand ManeSpectatorHi Alex I will recommend you then use button switch with three option then,- Same as header
- upload new
- disable
May 28, 2020 at 11:36 am in reply to: Sort course category carousel using custom order or ID #263706Makarand ManeSpectatorHI Jackson I dont need to exclude. I need to re-order it, way my client want. Tell me where code of this elementor block is locatedMakarand ManeSpectatorDone. thanksMakarand ManeSpectatorHi Any updateMakarand ManeSpectatorHi Alex, I need to fix few some things quickly, can you tell me how I can fix this now. Why translate function does not return original text?Makarand ManeSpectatorHi Veronica, That idiotic way I feel. Why to keep unwanted HTML in output. If I don't want logo in footer then it should removed from options only. Unwanted HTML & unwanted CSS, how it will optimize performance of website. Isn't it unwanted load on DOM?Makarand ManeSpectatorHi Diana I have reimported customer settings for demo 14 & then fonts were fine for other pages. before it wasnt. Before checked it, I have resolved at my end. There are some more issue I am facing I will ask on separate ticketMakarand ManeSpectatorHi Diana U didnt understood issue. None of google font is loaded on other pages. Check HTML source. view-source:https://ch-lms.tyche.work/ Here are all fonts I have selected in options pagel<link rel='stylesheet' id='google-webfonts-css' href='//fonts.googleapis.com/css?family=Montserrat:100,200,300,regular,700,900|Poppins:300,regular,500,600,700|Yanone+Kaffeesatz:300&subsets=latin' type='text/css' media='all' />
This is fonts are loaded on other pages, which I have selected on vibe options panel. I have imported demo14 & need all design set well as per demo.Makarand ManeSpectator- when it will be resolved?
- Typing too takes time. By keeping patience I have added fonts. Issue now I saw with fotns is they are coming on homepage, but not on other pages https://ch-lms.tyche.work/all-courses/ Can you tell me why happening like this
- Ok fine
Makarand ManeSpectator- Point 1: can you please explain what is issue, so I can try sort out myself.
- Point 2: Any updates
- point 3: Image is missing inside your plugin. Check url I sent you. wp-content/plugins/vibe-customtypes/metaboxes/library/images/
-
AuthorPosts