-
AuthorPosts
-
April 28, 2024 at 2:32 pm #1441172
I use the avialayoutbuilder the elemt blog show blogpost.
how can i change the titel from h2 to other?April 28, 2024 at 3:40 pm #1441189Hey Christian,
Try adding this code to the end of your child theme functions.php file in Appearance ▸ Editor:function custom_script() { ?> <script> (function($) { $(function() { function replaceElementTag(targetSelector, newTagString) { $(targetSelector).each(function(){ var newElem = $(newTagString, {html: $(this).html()}); $.each(this.attributes, function() { newElem.attr(this.name, this.value); }); $(this).replaceWith(newElem); }); } replaceElementTag('.post-entry h2.post-title.entry-title ', '<h4></h4>'); }); }(jQuery)); </script> <?php } add_action( 'wp_footer', 'custom_script', 99 );
Please ensure to copy the code from the forum and not an email notification so the symbols are not converted.
In the code change:<h4></h4>
to suit. Note that this may not change the font size, if you also want to change the font size try this CSS in your Enfold Theme Options ▸ General Styling ▸ Quick CSS field:.html_elegant-blog #top .post-entry .post-title, .html_elegant-blog .avia-content-slider .slide-entry-title { font-size: 20px; }
and adjust to suit.
If this doesn’t help please include the url to the page in question so we can take a closer look.Best regards,
MikeApril 28, 2024 at 4:13 pm #1441194thanks. but i dont want use javascript.
any other possibility to override it in the loop-index?April 28, 2024 at 5:56 pm #1441208Hi,
In your opening post you said that you are using the blog element, so this is not the loop-index.php, it is the postslider.php You can add this code to the end of your child theme functions.php file in Appearance ▸ Editor:function my_avf_customize_heading_settings( array $args, $context, array $extra_args = array() ){ if( 'avia_sc_postslider' ){ $args['heading'] = 'h4'; } return $args; } add_filter( 'avf_customize_heading_settings', 'my_avf_customize_heading_settings', 10, 3 );
adjust the “h4” to suit.
Best regards,
MikeApril 29, 2024 at 5:08 am #1441239thats work! thanks
April 29, 2024 at 8:37 am #1441260 -
AuthorPosts
- You must be logged in to reply to this topic.