Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1441172

    I use the avialayoutbuilder the elemt blog show blogpost.
    how can i change the titel from h2 to other?

    #1441189

    Hey 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,
    Mike

    #1441194

    thanks. but i dont want use javascript.
    any other possibility to override it in the loop-index?

    #1441208

    Hi,
    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,
    Mike

    #1441239

    thats work! thanks

    #1441260

    Hi,

    Great, I’m glad that Mike could help you out. Please let us know if you should need any further help on the topic, or if we can close it.

    Best regards,
    Rikard

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.