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

    Hi
    i am using color row with 2 text blocks as area section below the main menu.
    Got the problem to place it to single blog news page. Used the debug modus and add the code into the function.php but this break the page layout although i have added the open and close [av_section] … any ideas how to add this to the blog single page?

    #1447397

    Hey Sebastian,
    It looks like your code in your functions.php has line breaks, please remove these and then it should work correctly for you.

    Best regards,
    Mike

    #1447446

    no, this was nt the issue, i have marged them all together but still the same.

    #1447450

    Hi,
    Ok, as I examine your page I see that the wrap_all & main divs are closed and your injected color section is outsite the page:
    Enfold Support 6011
    Then I recalled that injecting any full width element, like color sections, causes the page to auto close like this, so the way around this is to inject the HTML instead, so I tested this on my site linked below as a proof of concept and this is the code that I used:

    add_action('ava_after_main_title', 'ava_after_main_title_mod');
    function ava_after_main_title_mod() {
    	$post_id = get_the_ID();
        if(get_post_type( $post_id ) == "post" || is_archive() || is_category()) {
    		echo '<div id="av_section_1" aria-label="header-blog" style="background-color:#e7e6e0;" class="avia-section av-gurxi-f7ad7ba9aa66e762665269785c869839 main_color avia-section-no-padding avia-no-border-styling  avia-builder-el-0  avia-builder-el-no-sibling  block-fit-size avia-bg-style-scroll container_wrap fullsize"><div class="container av-section-cont-open"><main role="main" itemprop="mainContentOfPage" class="template-page content  av-content-full alpha units"><div class="post-entry post-entry-type-page post-entry-3814"><div class="entry-content-wrapper clearfix"><div class="flex_column_table av-lwc8c3ub-7fae82ac0e7450fe73ac250f770e4e79 sc-av_one_half av-equal-height-column-flextable"><div style="padding: 20px 0 20px 0;" class="flex_column av-lwc8c3ub-7fae82ac0e7450fe73ac250f770e4e79 av_one_half  avia-builder-el-1  el_before_av_one_half  avia-builder-el-first  first no_margin flex_column_table_cell av-equal-height-column av-align-bottom  "><div class="av-special-heading av-tkaly-59af4c81dd5bd8035cb05863635061b6 av-special-heading-h1 custom-color-heading blockquote modern-quote  avia-builder-el-2  el_before_av_textblock  avia-builder-el-first "><div style="font-size: 18px;color: #a07860;" class="av_custom_color av-subheading av-subheading_above"><p>Veranstaltungen und Lesungen</p></div><h1 style="color:#1f4339;font-size:45px;font-family: "librebaskerville", Helvetica, Arial, sans-serif;text-transform: none;" class="av-special-heading-tag" itemprop="headline">Veranstaltungen</h1><div class="special-heading-border"><div class="special-heading-inner-border"></div></div></div><section class="av_textblock_section av-3a7ov5-3365d9d47359d52499c6170f6e5d6913 " itemscope="itemscope" ><div class="avia_textblock" itemprop="text"><p style="color: #666666;font-size: 17px;">Wir laden Sie ein, an unseren gemeinsamen Veranstaltungen, Reisen und Lesungen an besonderen Orten, teilzunehmen. Weiteres erfahren Sie in der jeweiligen Veranstaltungsbeschreibung.</p></div></section></div><div class="flex_column av-fy05a-677df80f19dcd41d19a6c602b9b923d5 av_one_half  avia-builder-el-4  el_after_av_one_half  avia-builder-el-last  buch-monat no_margin flex_column_table_cell av-equal-height-column av-align-bottom  "><div class="avia-image-container av-9gv81-4c6171ac5adc202d5cf1671f776d7959 av-styling- avia-align-right  avia-builder-el-5  avia-builder-el-no-sibling " itemprop="image" itemscope="itemscope" ><div class="avia-image-container-inner"><div class="avia-image-overlay-wrap"><img decoding="async" fetchpriority="high" class="wp-image- avia-img-lazy-loading-not- avia_image " src="/wp-content/uploads/2024/05/area-book-ueber-uns.png" alt="" title="" itemprop="thumbnailUrl"></div></div></div></div></div></div></div></main></div></div>';
    	}
    }

    Note that I didn’t understand why you had $thumbnail = get_the_post_thumbnail_url ( $post_id ); since I saw no call for $thumbnail so it’s not in my code, feel free to adjust after to test my code. I also had to add so style inline so my test would look like your page, it should not cause a issue for you.
    Please ensure to copy the code from the forum and not an email notification so the symbols are not converted.

    Best regards,
    Mike

    #1447473

    ahhh ok, understand..you have used the html code from the Inspector.
    I used the [av_section] that was provided by Enfold system .. good to know that it also works so easy :)

    Thx
    (we can close here)

    #1447477

    Hi,
    Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Blog: html area block in single news’ is closed to new replies.