-
AuthorPosts
-
April 24, 2018 at 3:49 pm #945983
Why has this widget been removed from 4.3, as stated in the Changelog?
https://kriesi.at/documentation/enfold/enfold-changelog/We use this widget throughout our site???!!!
How can I get it back?
Update: the code block for this widget is still in class-framework-widgets.php (lines 931-1011) but after the 4.3 update Enfold Combo Widget is no longer visible under Available Widgets and the widget applied in Displayed Everywhere has been deleted by the update, and the Popular/Recent/Comments section in the sidebar is no longer displayed. So it’s definitely gone. WHY?
- This topic was modified 6 years, 6 months ago by zimbo.
April 26, 2018 at 5:07 am #947070Hey zimbo,
Thank you for using Enfold.
I will ask the development team. Please wait for their response. In the meantime, use this code in the functions.php file to reactivate the combo widget.
/* * activate framework combo widget */ if(!function_exists('avia_register_avia_widgets_combo')) { function avia_register_avia_widgets_combo() { register_widget( 'avia_combo_widget' ); } avia_register_avia_widgets_combo(); //call the function immediatly to activate }
Best regards,
IsmaelApril 26, 2018 at 12:47 pm #947239Adding that code to functions.php (in a child theme) causes the site to crash.
Chrome says:
This page isn’t working dev.xyz.com is currently unable to handle this request. HTTP ERROR 500
Edge says:
HTTP 500 error That’s odd... the website can’t display this page The site may be under maintenance or could have a programming error.
Firefox just has a blank page, no error message.
Remove the code, site works again.
April 26, 2018 at 1:24 pm #947250Hi!
Thanks for the update. Did you copy it from your email? Please copy it directly from the forum.
Best regards,
IsmaelApril 26, 2018 at 1:56 pm #947265Copied from the forum originally, not email. Just tried it again, same result.
I use Dreamweaver for code edits and this shows up any syntax errors, but there aren’t any. Went thru code a character at a time and checked no hidden characters. I even tried copying the code block into a text editor, then into Dreamweaver, again just in case there were any hidden characters, but no change. Code block still kills the site.
Screenshot of functions.php
https://imgur.com/a/LC5QYnuApril 27, 2018 at 3:10 am #947562Hi!
The same code works on my end. Please provide the login details so that we can add it on the file.
Regards,
IsmaelApril 27, 2018 at 11:28 am #947851In private content. It’s a test site so do what you want but be aware that when I upload the code to functions.php and the 500 error occurs, it locks you out of the WP admin portal as well. So I’ve provided the FTP details as well. Please note the root directory comments. Please don’t alter the “proper” www site.
April 30, 2018 at 9:08 am #948870Hi,
Thank you for the update. We adjusted the function a bit.
/* * activate framework combo widget */ if(!function_exists('avia_register_avia_widgets_combo')) { function avia_register_avia_widgets_combo() { register_widget( __NAMESPACE__ . '\\avia_combo_widget' ); } add_action('widgets_init', __NAMESPACE__ . '\\avia_register_avia_widgets_combo'); }
The combo widget is now activated.
Best regards,
IsmaelApril 30, 2018 at 2:26 pm #949089Yes, it is now active – but it’s behaviour has changed. It’s no longer displayed as tabs in 4.3.
Look at the combo widget on this post. This is Enfold 4.2.6.
Now look at the widget on 4.3: this post.
Check the code in Chrome Dev Tools. After <section id=”avia_combo_widget-3″… there is a <div class=-“tabcontainer border_tabs top_tab tab_initial_open tab_initial_open__1″ on both, but then 4.3 is missing the next <div class=”tab_titles”> that is in 4.2.6. I guess this is what makes it display as tabs?
How can I get 4.3 to display as it did in 4.2.6?
And what have the devs said about why they removed it? Can’t we just have it back as it was?
May 3, 2018 at 5:26 am #950447Hi zimbo,
Can you disable caching and minification for now?
Best regards,
VictoriaMay 3, 2018 at 1:00 pm #950730I have deactivated the Autoptimize plugin that caches, and disabled the compression in Enfold > Performance, plus left all of the other elements in Performance ‘off’.
Makes no difference. The Combo Widget still doesn’t display as it did in 4.2.6 and before. I also tried deactivating all plugins to see if there was a conflict somewhere, but again no difference.
Why has this not been fixed in 4.3.1? There is no mention of it in the Changelog.
May 4, 2018 at 8:56 pm #951850Hi,
Please allow us some time so we can check what differences we might be having.
Thank you
Best regards,
BasilisMay 6, 2018 at 5:24 am #952210Please dont remove the Avia Combo widget
same here.. still the combo widget does not appear.
- This reply was modified 6 years, 6 months ago by jalmz.
May 8, 2018 at 5:58 am #953101Hi,
The widget relies on the tab shortcode script so you have to add this filter in the functions.php file.
// https://pastebin.com/raw/mKL4zGN9
Best regards,
IsmaelMay 14, 2018 at 6:51 pm #956601Sorry for the delay but I was away most of last week.
I have added the code in @Ismael’s reply #953101 but the Combo Widget is still not working as it did before 4.3. See this post.
In case anyone has forgotten, this post shows how the Combo Widget should display.
In fact adding @Ismael’s latest code suggestion displays the widget twice for some reason. See here.
Can you please just ask the developers to reinstate the Combo Widget in the upcoming 4.4 release, so that it works as it used to?
And no-one has explained why it was removed in the first place… :-(
May 17, 2018 at 5:02 am #957895Hi,
@zimbo: It was removed because it doesn’t conform with the themee’s compression feature as explained by Kriesi.
We forgot to add the css codes for the tab element. We added it in the Quick CSS field. The widget should work properly now.
Best regards,
IsmaelMay 17, 2018 at 2:02 pm #958151Wow – 200 lines of CSS… I’ll move it into my child theme.
I didn’t see Kriesi’s explanation – where is that please? I can’t see anything in the changelog.
And are there any implications / potential problems with re-including the combo widget?
May 18, 2018 at 9:15 am #958494Hi,
I didn’t see Kriesi’s explanation – where is that please?
I just asked him on our own team channel. I’m not sure why he didn’t include it in the change log.
You can leave the combo widget enabled as it is. It won’t affect the site aside from loading a few bytes of additional css and js script.
Best regards,
IsmaelAugust 22, 2018 at 5:04 am #1000132Here was our solution for the deprecated combo widget. We customized the css so that the widget would closely resemble Enfold’s deprecated widget.
1. Install and activate the “WP Tab Widget” plugin from the WordPress repository.
2. Go to Wp Admin > Appearance > Widgets and drag the “WP Tab Widget” where you want it to appear on your site.
3. Add the CSS below to your Quick CSS or style.css file. (If you use Quick CSS for testing, you should move the new css to your style.css to make it permanent.)
4. Customize the plugin settings to your taste (we did not program the css to include the tags tab, only recent, popular, and comments)/* WP Tab Widget Avia Combo Widget Replacement */ .wpt_widget_content { border: none !important; } .wpt_widget_content .inside { border-top: 1px solid #e1e1e1 !important; margin-top: -1px !important; padding-top: 0px !important; } .wpt_widget_content .tab-content li { padding-left: 0px !important; padding-right: 0px !important; padding-bottom: 10px !important; } .wpt_thumbnail, .wpt_avatar { margin-right: 9px !important; padding: 3px !important; float: left !important; margin-top: 4px !important; margin-bottom: 4px !important; border-style: solid !important; border-width: 1px !important; height: 36px !important; width: 36px !important; display: block !important; } .wpt_widget_content .entry-title a { color: #222222 !important; overflow: hidden !important; font-size: 13px !important; margin-top: 0px !important; font-weight: bold !important; margin-top: 2px !important; display: block !important; line-height: 20px !important; } .wpt_comment_content p { color: #222222 !important; overflow: hidden !important; font-size: 12px !important; margin-top: 0px !important; font-weight: bold !important; margin-top: 2px !important; display: block !important; line-height: 20px !important; } .wpt_widget_content .wpt-postmeta { font-size: 11.5px !important; } .wpt_comment_meta { margin-top: 4px !important; margin-bottom: 4px !important; line-height: 0px !important; } .wpt_comment_meta a { font-size: 11.5px !important; font-weight: normal !important; line-height: 18px !important; } .wpt_thumbnail .wp-post-image { width: 28px; height: 28px; object-fit: cover; } .wpt_widget_content .tab-content li { border: none !important; margin: 0px !important; } .has-3-tabs { width: 100.3% !important; } .has-3-tabs li { clear: none !important; } .has-3-tabs a { border: none !important; background-color: #fff !important; font-weight: normal !important; font-size: 12px !important; line-height: 24px !important; } .has-3-tabs a:hover { color: #666666 !important; } .has-3-tabs .selected { border-bottom: 2px solid #666; } .has-3-tabs .selected a { font-weight: bold !important; color: #666666 !important; }
Tip: The plugin determines popular posts based on the plugin’s view counter. When the plugin is first installed, all your posts will have a 0 views value. Until you or your visitors start hitting pages on your site, the plugin will randomly choose posts to show in the popular posts tab. If you do not want to wait for traffic to your site, or you want to replicate the list of popular posts you had previously before Kriesi removed the combo widget,
0. Make sure you have your database backed up, just in case!
1. Go to WP Admin > Posts, mouseover the title of your posts, and look at the URL in your browser’s status bar (at the bottom of your browser window)
2. Make note of the post_id (the url will include “post=x”) for the post whose view count you want to modify (do this for each post you want to modify)
3. Go into your web host’s control panel, to phpMyAdmin > youraccount_wp* (your WP database) > wp*_postmeta > Search (tab)
4. Query for the post_id assigned to the post you want to raise or lower in the popular posts widget.
5. Locate the “_wpt_view_count” meta_key, then change the “meta_value”. The higher the number, the higher it will appear in the popular posts tab.
6. Repeat steps 3-5 for each post.Ta da! Your beloved combo widget is back. Enjoy!
August 22, 2018 at 3:40 pm #1000405Hi,
@perfectword Thanks for sharing!For your information, we are planning to improve combo widget and bring it back in one of the updates, most probably upcoming one :)
Best regards,
YigitAugust 22, 2018 at 4:20 pm #1000417For your information, we are planning to improve combo widget and bring it back in one of the updates, most probably upcoming one :)
Hallelujah! :-)
August 22, 2018 at 6:13 pm #1000457I’m sure a lot of people will be very happy about that!
I would like to point out, however, that the WP Tab Widget plugin is superior to the deprecated combo widget, in that one can choose in the plugin settings which order to display the tabs. Previously, we had to edit Enfold’s deprecated combo widget code to accomplish this. WP Tab Widget also uses ajax, and has other more robust features accessible via settings.
Also, for our purposes, we actually prefer the method WP Tab Widget uses to order popular posts. Where the Enfold deprecated combo widget orders popular posts based on comment count, WP Tab Widget does it based on view count. This better suits our needs.
So all that said, perhaps the powers that be can consider these features when the combo widget is resurrected!
August 23, 2018 at 8:55 am #1000612Hi perfectword,
Thanks for sharing and for the feedback, much appreciated :-)
Best regards,
RikardNovember 24, 2018 at 3:59 pm #10372641: Good news
2: bad news is that the old code to keep the Combo-widget crashed my my whole website after i updated Enfold.
The code i used was recommended by you and if you do so you should at least mention that in your changelog.
Below you see the the code you gave me.
Now i need to know how i remove the Tag & Comment-tabs from your Widget.
Thanks//entfernt den Kommentarblock und die Datumsangaben aus dem Combo Widget // class avia_combo_widget extends WP_Widget { function avia_combo_widget() { //Constructor $widget_ops = array('classname' => 'avia_combo_widget', 'description' => 'A widget that displays your popular posts, recent posts, recent comments and a tagcloud' ); $this->WP_Widget( 'avia_combo_widget', THEMENAME.' Combo Widget', $widget_ops ); } function widget($args, $instance) { // prints the widget extract($args, EXTR_SKIP); $posts = empty($instance['count']) ? 4 : $instance['count']; echo $before_widget; echo "<div class='tabcontainer border_tabs top_tab tab_initial_open tab_initial_open__1'>"; echo '<div class="tab first_tab active_tab widget_tab_popular"><span>'.__('Popular', 'avia_framework').'</span></div>'; echo "<div class='tab_content active_tab_content'>"; avia_get_post_list('cat=&orderby=comment_count&posts_per_page='.$posts); echo "</div>"; echo '<div class="tab widget_tab_recent"><span>'.__('Recent', 'avia_framework').'</span></div>'; echo "<div class='tab_content'>"; avia_get_post_list('showposts='. $posts .'&orderby=post_date&order=desc'); echo "</div>"; echo '<div class="tab last_tab widget_tab_tags"><span>'.__('Tags', 'avia_framework').'</span></div>'; echo "<div class='tab_content tagcloud'>"; wp_tag_cloud('smallest=12&largest=12&unit=px'); echo "</div>"; echo "</div>"; echo $after_widget; } function update($new_instance, $old_instance) { $instance = $old_instance; foreach($new_instance as $key=>$value) { $instance[$key] = strip_tags($new_instance[$key]); } return $instance; } function form($instance) { //widgetform in backend $instance = wp_parse_args( (array) $instance, array('count' => 4) ); if(!is_numeric($instance['count'])) $instance['count'] = 4; ?> <p> <label for="<?php echo $this->get_field_id('count'); ?>">Number of posts you want to display: <input class="widefat" id="<?php echo $this->get_field_id('count'); ?>" name="<?php echo $this->get_field_name('count'); ?>" type="text" value="<?php echo esc_attr($instance['count']); ?>" /></label></p> <?php } }
November 27, 2018 at 1:35 pm #1037989Hi,
You can simply edit your widget and choose which tabs to display and in which order to display them – http://prntscr.com/lnk328 :)
Best regards,
Yigit -
AuthorPosts
- You must be logged in to reply to this topic.