Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Uplift › Change Widget Title from H3 to H1
New Landing › How can we help? › Themeforest Theme Support › Uplift › Change Widget Title from H3 to H1
- This topic has 11 replies, 3 voices, and was last updated 6 years by David Martin – Support.
-
Posted in: Uplift
-
June 27, 2017 at 12:56 pm #330178
Hi I use the text-clock element quite often and the widget-title. The widget-title is set to h3 I want to change to change the widget title from H3 to H1. How can I do this?
Thanks
June 27, 2017 at 1:46 pm #330184Hi,
That’s only possible editing the code, the best alternative would be to add some custom css to that h3.
example:
.title-wrap .spb-heading{ font-size:14px!important: }
-Rui
June 27, 2017 at 1:50 pm #330185That is going to restrict my SEO especially I build my websites off of headline hierarchy H1 -> H6 . What do you recommend?
Thanks.
June 27, 2017 at 2:14 pm #330188Hi,
Multiple h1 on a page are detrimental to your SEO.
We supply filters to allow you to override the heading HTML via a child theme
function.php
.The filters are called
sf_sidebar_before_title
andsf_sidebar_after_title
. Do you have programming knowledge to utilise that and change the output or do you require assistance?June 28, 2017 at 3:24 am #330293I am somewhat familiar with it. I found it. However how do I write this for a child theme?
Thanks
/* SIDEBAR FILTERS
================================================== */
function uplift_sidebar_before_title() {
return ‘<div class=”widget-heading title-wrap clearfix”><h3 class=”spb-heading”><span>’;
}
add_filter(‘sf_sidebar_before_title’, ‘uplift_sidebar_before_title’);function uplift_sidebar_after_title() {
return ‘</span></h3></div>’;
}
add_filter(‘sf_sidebar_after_title’, ‘uplift_sidebar_after_title’);June 28, 2017 at 9:50 am #330305Inside the child theme
functions.php
file you would write your own two functions to return new values for both filters, ex:function uplift_sidebar_before_title_custom() { return '<div class="widget-heading title-wrap clearfix"><h1 class="spb-heading"><span>'; } add_filter('sf_sidebar_before_title', 'uplift_sidebar_before_title_custom'); function uplift_sidebar_after_title_custom() { return '</span></h1></div>'; } add_filter('sf_sidebar_after_title', 'uplift_sidebar_after_title_custom');
June 29, 2017 at 6:14 pm #330573It’s not working, the H3 class is still present..
June 29, 2017 at 6:19 pm #330574I’d need to see your child theme code, do you have FTP details to provide me with?
June 29, 2017 at 6:22 pm #330577So you know I copied exactly what you provided. I can provide you a link if you prefer.
June 30, 2017 at 10:11 am #330612I’d need a code view, it’s possible your action may need a higher priority.
Can you provide a zip file of your child theme for me? A dropbox link so I can download it will suffice.
Thanks.
June 30, 2017 at 10:58 am #330620This reply has been marked as private.June 30, 2017 at 11:02 am #330623Hi,
Thanks but I would need a download link via dropbox or a github gist file.
Try amending to this:
function uplift_sidebar_before_title_custom() { return '<div class="widget-heading title-wrap clearfix"><h1 class="spb-heading"><span>'; } add_filter('sf_sidebar_before_title', 'uplift_sidebar_before_title_custom', 100); function uplift_sidebar_after_title_custom() { return '</span></h1></div>'; } add_filter('sf_sidebar_after_title', 'uplift_sidebar_after_title_custom', 100);
-
Posted in: Uplift
You must be logged in and have valid license to reply to this topic.