Forum Support

Shape 5
May 13, 2021, 05:16:59 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Shape 5 Forum
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Widget heading being filtered out  (Read 289 times)
dache74
Jr. Member
**
Offline Offline

Posts: 21



« on: October 12, 2016, 05:34:14 PM »

Hi, I've deployed a widget to display recent articles from a category, but the template keeps filtering out the widget title. I set the widget title to Recent News, but the title gets rendered as commented out:
Code:
<!--<span class=&quot;s5_h3_first&quot;>Recent</span> <span class=&quot;s5_h3_last&quot;>News</span>-->

Does not matter which widget style I pick, the title does not show up. How do I enable displaying the title?
Here is the page: http://www.hackerdad.co/. The widget is at the top of the left column.

Thanks!
« Last Edit: October 12, 2016, 05:35:47 PM by dache74 » Logged
Tristan Rineer
Global Moderator
*****
Offline Offline

Posts: 3858

Gravatar


« Reply #1 on: October 13, 2016, 10:59:45 AM »

Is that a widget from WP, or a third party plugin?  I may have an idea as to why it's acting that way, but narrowing down the source of the widget may help in the troubleshooting.

You can also try using the troubleshooting method that I have in the code of theme-globals.php.  Just look for the "Classfix for Widget Styles" section.
Logged

Tristan Rineer
------------
Shape 5 Team



- Need a great host for your website? We highly recommend siteground.com!


- Put your trust in the hands of our extremely qualified staff to get your job done right!


- Firebug is the most powerful web development and debugging tool, and it will save you a lot of time, frustration and forum questions:
Install Firebug
dache74
Jr. Member
**
Offline Offline

Posts: 21



« Reply #2 on: October 13, 2016, 12:46:36 PM »

It's 3rd party -- Category Posts (https://wordpress.org/plugins/category-posts/). I tried changing the clearfix setting to true, but it did not help. 
Logged
Tristan Rineer
Global Moderator
*****
Offline Offline

Posts: 3858

Gravatar


« Reply #3 on: October 14, 2016, 07:30:27 AM »

You should be able to find the following code in theme-globals.php:

Code:
/** Classfix for Widget Styles **/

//"true" to show before/after for each widget - after needs to match the wp-options field that widget settings are stored in.
$s5_wid_styles['classfix']['show'] = false;
//To fix a mis-named widget "class", add a line in the format of:  'before' => 'after',
//Include the single quotes & comma, as seen below.
$s5_wid_styles['classfix']['names'] = array(
'recent_entries' => 'recent-posts',
'recent_comments' => 'recent-comments',
'archive' => 'archives',
'advanced_recent_posts_widget' => 'widget_advanced-recent-posts',
'rpjc_widget_cat_recent_posts' => 'widget_rpjc_widget_cat_recent_posts',
);


/** End Classfix for Widget Styles **/

If you set the Class Fix "show" variable to "true" then refresh your site, every widget should show a before/after status line.  For any widget where the before & after don't match, adding an item to the names array should fix the title detection.
Logged

Tristan Rineer
------------
Shape 5 Team



- Need a great host for your website? We highly recommend siteground.com!


- Put your trust in the hands of our extremely qualified staff to get your job done right!


- Firebug is the most powerful web development and debugging tool, and it will save you a lot of time, frustration and forum questions:
Install Firebug
dache74
Jr. Member
**
Offline Offline

Posts: 21



« Reply #4 on: October 14, 2016, 07:59:54 AM »

It matches for this widget:

Before: cat-post-widget
After: cat-post-widget
Logged
Tristan Rineer
Global Moderator
*****
Offline Offline

Posts: 3858

Gravatar


« Reply #5 on: October 17, 2016, 07:00:19 AM »

If that is the case, then something in the way that plugin is coded is preventing the widget styling code from being able to detect if the widget has a title or not.

You can try changing the following code in theme-globals.php, but it may cause other widgets to show title code even when they don't one, or it might completely break the layout of your site:

Find:
Code:
/* no_title */
$s5_wid_styles['no_title'] = $s5_wid_styles['clean'];
$s5_wid_styles['no_title']['before_title'] = '<!-- h3>';
$s5_wid_styles['no_title']['after_title'] = '</h3 -->';

Change it to:
Code:
/* no_title */
$s5_wid_styles['no_title'] = $s5_wid_styles['clean'];
// $s5_wid_styles['no_title']['before_title'] = '<!-- h3>';
// $s5_wid_styles['no_title']['after_title'] = '</h3 -->';

That will prevent widgets without detected titles from commenting out the title section of the code.


Unfortunately, if that doesn't work, I'm not sure what else to tell you.  There's a lot of code that goes into making the framework so flexible, but that also means that (as per the Shape 5 Terms of Use), there can be no guarantee of compatibility with third-party plugins; but most plugins I've tried have worked fine - it's very rare to find one that has issues.
Logged

Tristan Rineer
------------
Shape 5 Team



- Need a great host for your website? We highly recommend siteground.com!


- Put your trust in the hands of our extremely qualified staff to get your job done right!


- Firebug is the most powerful web development and debugging tool, and it will save you a lot of time, frustration and forum questions:
Install Firebug
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2013, Simple Machines
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Looking for the largest variety in template designs? Look no more. Never buy 1 theme again. Signups start at just $89 for access to all of our themes.
Send Us An Email
Please send us your questions and we will email you back as soon as we can. Product support questions should be posted in our support forums under the Help menu. Our staff will assist you from there.