Tagged: 

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1134091

    Hi,
    I’m trying to modify the pagecontent shortcode. I already created a copy in my child theme and tried to modify the output so that a wrapper div is going around all the page content that is shown. However, the wrapper div always gets added to the end of the first color section that is in the page that gets included.

    Problem seems to be that this is not doing what I thought:

    							$content =	'<div class="page_content_wrapper">';
    							$content .= Avia_Builder()->get_posts_alb_content( $entry->ID );
    							$content .= '</div>';

    It seems the content always gets parsed through some stuff and so my wrapper only gets included and not really wrapped.
    How do I get a wrapper around this?
    It would also help if I would find a way to wrap a wrapper around several colour sections so I could achieve my design :)

    Thanks to all enfold ninjas that could give me a hint!

    Cheers Sascha

    #1135724

    Hey saschapi,

    $content .= Avia_Builder()->get_posts_alb_content( $entry->ID );

    replace this with

    .= get_the_content( $entry->ID );

    and let us know if this works

    Best regards,
    Basilis

    #1135952

    Hi Basilis,
    this results in a timeout error:
    Fatal error: Maximum execution time of 30 seconds exceeded in /www/htdocs/w019bb9d/webroot/wp-includes/shortcodes.php on line 447
    Maybe you got another idea? :)
    Cheers and thanks for your efforts.
    Sascha

    #1136902

    Hi,

    Thank you for the update.

    Have you tried using the “avf_template_builder_content” filter instead of editing the template-builder.php file directly?

    Example:

    add_filter('avf_template_builder_content', function($content) {
         $output  =	'<div class="page_content_wrapper">';
         $output .= $content;
         $output .= '</div>';
         return $output;
    }, 10, 1);
    

    Best regards,
    Ismael

    #1137091

    This would wrap EVERYTHING on a page. But I need to wrap only a couple of coloursections. :-/

    #1137342

    Hey!

    This would wrap EVERYTHING on a page.

    I thought that’s what you’re trying to do based on your previous modification. You might be able to use the jQuery appendTo function to move any specific sections inside another container.

    // https://api.jquery.com/appendTo/

    You can create the wrapper or div dynamically, then move the sections inside it.

    // https://api.jquery.com/insertAfter/

    Regards,
    Ismael

    #1137637

    I know that I could do it with JavaScript, but I’d rather have it in the code itself. Especially because of performance…

    #1137797

    Hi,

    Unfortunately, that’s not possible. You can’t extract specific part of the post content, at least not without doing significant alterations in the theme. Why do you need to wrap these sections? Maybe we can achieve what you’re trying to do using a different approach.

    Thank you for the update.

    Best regards,
    Ismael

    #1137831

    Hi Ismael,
    I know that it is not easy, but I have run into this issue several times in the past and right now it is the only good solution.
    My task is to build a custom slider into a one pager that consists of several color sections. I have added a link to an example below. This is currently done by having 4 fullwidth columns inside a color section. But this limits the usage to fullwidth content. I need every slide to be a color section so I can do some more flexible stuff inside with the columns.

    I’m aware that this is some customisation which is probably not covered by your support policy, that’s why I will for sure do it myself, I just need the right hint :) My best guess was, that It is possible to wrap all content of the “include another post” shortcode with a div with a class. But unfortunately the color section logic will break all my attempts (see above).

    I’m 100% sure this will be useful for others as well :) Do you have any other ideas how to achieve this?

    Cheers and thanks for looking into it
    Sascha

    #1138642

    Hi,

    Thank you for the update.

    Have you tried using the Layer Slider? That should satisfy your requirements. However, you have to purchase a regular Layer Slider license because the “play by scroll” feature is not available in the theme license.

    // https://layerslider.kreaturamedia.com/sliders/play-by-scroll/

    You can also append a set of sections inside the “scrollmagic-pin-spacer” container using JavaScript as suggested above.

    Best regards,
    Ismael

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