Support only during business hours : Monday to friday, from 8:30 am – 5:30 pm CEST

Due to the decrease in our staff due to vacations, our response time may be longer.

Be sure we're doing our best to manage your topic as soon as possible.

Muamer

Forum Replies Created

Viewing 20 posts - 1 through 20 (of 20 total)
  • Author
    Posts
  • Muamer
    Participant
    • 13 Topics
    • 33 Posts
    @mllapan

    Here is the image of a problem.

    Muamer
    Participant
    • 13 Topics
    • 33 Posts
    @mllapan

    I fixed that CSS problem.
    See this now, how embeded posts look inside an another post.
    https://mllapan.com/kupovina-ram-memorije-za-pc/

    I will not touch this until you see it, so you know I am not making problem here out of nowhere.

    It sometimes load, other times it glitches with blockquote.

    Muamer
    Participant
    • 13 Topics
    • 33 Posts
    @mllapan

    I will re-download theme, this seems to be an complete css issue, despite I am clearing the cache I can’t get normal result.
    It says it is applied when I investigate, but it actually is not.
    Also it is child theme, so maybe my child theme is not compatible with newest update.

    But seriously, stop switching hooks for anything, because there are we who have large tweaked child themes, I always lose days to fix child theme after each update.

    Muamer
    Participant
    • 13 Topics
    • 33 Posts
    @mllapan

    I just discovered that searchbar at top has problems too.
    I will probably find more and more problems with this update.

    Muamer
    Participant
    • 13 Topics
    • 33 Posts
    @mllapan
    This reply has been marked as private.
    Muamer
    Participant
    • 13 Topics
    • 33 Posts
    @mllapan

    Thanks, it works now, I was in general text color option.

    Muamer
    Participant
    • 13 Topics
    • 33 Posts
    @mllapan

    Main or default page template, primary div is 50%, secondary div is 25%, rest is empty, everything is floated left, we do not have choice to pick other default template in customizer like for single post under the “Spread” option.

    Muamer
    Participant
    • 13 Topics
    • 33 Posts
    @mllapan

    Hi, @themodactyl.

    Here is the screenshot.
    It does not matter what kind of code is used, even if you use lets say Ads Inserter plugin, once Adsense is inserted into between paragraphs, or into bbpress topic page, or anything inside normal page text, it will stretch primary div into full width of the screen and will push down sidebar under primary div.

    I am saying this all the time, but seems no one understands me.
    It is not about the code I, or anyone else use to inject ads, but about flex styling.

    For example, if I use width: 600px !important, than, the advertisement will not push sidebar to a new row, under the primary div. but than that is not any responsive advertisement and looks bad on mobile, or if you make it good on mobile, it will look too small on desktop.
    We need some javascript or jQuery that will prohibit adsense ads do this with flex css.

    You can acomplish the same with child theme and using this:
    – Put your single post template to have sidebar, add any widget in sidebar.
    Use this in functions:

    add_filter( 'the_content', 'post_ads_1_paragraph' );
     
    function post_ads_1_paragraph( $content ) {
        $ad_code = '<div class="advertparagraph">
    
    <blockquote>PUT ADSENSE CODE IN HERE OR ADROTATE SHORTCODE.</blockquote>
    
    </div>';
     
        if ( is_single() && ! is_admin() ) {
            return prefix_insert_after_1nd_paragraph( $ad_code, 1, $content );
        }
         
        return $content;
    }
      
    function prefix_insert_after_1nd_paragraph( $insertion, $paragraph_id, $content ) {
        $closing_p = '</p>';
        $paragraphs = explode( $closing_p, $content );
        foreach ($paragraphs as $index => $paragraph) {
     
            if ( trim( $paragraph ) ) {
                $paragraphs[$index] .= $closing_p;
            }
     
            if ( $paragraph_id == $index + 1 ) {
                $paragraphs[$index] .= $insertion;
            }
        }
         
        return implode( '', $paragraphs );
    }

    The code will inject ad after first paragraph.
    Than clear the cache, and you will see ad is pushing sidebar under the primary div.

    Muamer
    Participant
    • 13 Topics
    • 33 Posts
    @mllapan

    Hi, @ronald1993.

    1. Create page named “Homepage” (If you imported demo, skip this step.).
    2. Go Setting -> Reading -> Static page -> Homepage (Choose one you have created or if you imported demo, choose imported homepage.).
    3. Go Appearance -> Widgets -> Add some widgets to Homepage sidebar. (Skip this step if you imported demo.)

    Muamer
    Participant
    • 13 Topics
    • 33 Posts
    @mllapan

    This is not about BuddyPress, BBpress, it is also the problem of the single posts, single pages too.
    Any adsense on single posts, single pages will push sidebar in the new row, because responsive adsense ad is able to push flex box to full width of the screen.
    The problem is called flex in the theme.

    Muamer
    Participant
    • 13 Topics
    • 33 Posts
    @mllapan

    It is about the theme, because it was styled by FLEX.
    I asked the same question for bbpress, but until today, I did not realized it was the same problem, now I am.

    Yeah, the theme is built by flex css, and you need to provide fix for responsive ads inside your theme for your customers, or apply the fix to theme update on the primary div, as the most of the people use adsense code.

    I am not the only one, many people asked the same, but they did not realized they have problem with the way of theme styling, and they are trying to change php functions instead:
    https://support.themosaurus.com/forums/search/adsense/

    Muamer
    Participant
    • 13 Topics
    • 33 Posts
    @mllapan

    Any code you try will give you problem when new tab is reloaded, because of FLEXstyling of the theme.
    You will get:
    Fluid responsive ads must be at least 250px wide: availableWidth=0

    Muamer
    Participant
    • 13 Topics
    • 33 Posts
    @mllapan

    Thanks.
    I really need fix to this!
    It is probably because using FLEX, parent has no width, and google add feels like it can spread to full screen width.

    Muamer
    Participant
    • 13 Topics
    • 33 Posts
    @mllapan

    Remove code:

    function div_wrapper($content) {
        // match any iframes
        $pattern = '~<iframe.*</iframe>|<embed.*</embed>~';
        preg_match_all($pattern, $content, $matches);
    
        foreach ($matches[0] as $match) {
            // wrap matched iframe with div
            $wrappedframe = '<div class="videoWrapper">' . $match . '</div>';
    
            //replace original iframe with new in content
            $content = str_replace($match, $wrappedframe, $content);
        }
    
        return $content;    
    }
    add_filter('the_content', 'div_wrapper');
    
    add_filter( 'bp_embed_oembed_html', function( $html, $url, $attr, $rawattr ) {
        // Wrap the embed with a <div> tag.
        $html = '<div class="videoWrapper">' . $html . '</div>';
        return $html;
    }, 10, 4 );

    Inside child theme, create folder named js, inside this folder add custom.js as follows:

    /* Wraps YouTube sa Div-om. */
    jQuery(document).ready(function() {
        jQuery('iframe[src*="youtube.com"]').wrap('<div class="videoWrapper" />');
    });

    Insde functions.php add this:

    function add_my_script() {
        wp_enqueue_script(
            'script',
            get_stylesheet_directory_uri() . '/js/custom.js',
            array( 'jquery' )
        );
    }
    
    add_action( 'wp_enqueue_scripts', 'add_my_script' );

    Keep CSS:

    .videoWrapper {
      position: relative;
      padding-bottom: 56.25%; /* 16:9 */
      height: 0;
    }
    .videoWrapper iframe {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
    }

    Now it should influence youtube videos, all around, without messing up other iframes.

    Muamer
    Participant
    • 13 Topics
    • 33 Posts
    @mllapan

    Thanks, but I just discovered this code is not good, because it is wrapping also other iframe content like Twitter or Facebook embeds.
    It would be great if someone comes with code to isolate only YouTube embeds with code above, in another words, my code should be applied only to src= that includes youtube.com.

    After this is acomplished, videos will look great in 16:9.

    Also we need some code to recognize and auto embed image in imginstead in a url.

    Muamer
    Participant
    • 13 Topics
    • 33 Posts
    @mllapan

    I have put adsense under div class advertbbpress, as it is advertisement for forum. CSS of this advertisement is:

    .advertbbpress {
        display: block;
        width: 100%;
        min-width: 250px;
        margin: 50px 0 0 0 !important;
    }

    I am using adrotate, and I am calling the code after first post via this function…

    function display_after_topic() {
        if( get_post_type() == 'topic') {
        $text = '<div class="advertbbpress">' . adrotate_ad(4) . '</div>';
        echo $text;
        }
        else {
        return ;
        }
    }

    It shows advertisement after the first topic.

    Althought I am asking this about forum, same is happening also in posts, pages and everywhere. The way theme is developed, somehow google ads are pushing the parent divs to full width, and everything after is going in a new row. Check here: https://mllapan.com/forum/tema/moj-pc-se-ne-moze-nositi-s-uredjivanjem-video-zapisa/

    Note: The ad is under the word “Hvala!” as it sometime does not show.

    I know it can be fixed by adding fixed width to advertbbpress class, but than on different screens ad will overflow things, or I would have a lot of css to do for all the screens.

    Muamer
    Participant
    • 13 Topics
    • 33 Posts
    @mllapan

    Fixes:

    .wp-block-embed__wrapper .videoWrapper {
      display: contents;
    }
    
    .wp-block-embed {
        padding: 1rem !important;
    }
    
    #buddypress:not(.youzer) #activity-stream.grimlock-buddypress-activity-list .activity-item .activity-inner {
        padding: 1rem !important;
    }

    If someone find problems with this, lemme know.

    Muamer
    Participant
    • 13 Topics
    • 33 Posts
    @mllapan
    This reply has been marked as private.
    Muamer
    Participant
    • 13 Topics
    • 33 Posts
    @mllapan

    I solved this, but there is a problem, only admin can send friend requests, normal users don’t see those buttons.

    Muamer
    Participant
    • 13 Topics
    • 33 Posts
    @mllapan
    This reply has been marked as private.
Viewing 20 posts - 1 through 20 (of 20 total)

Troubleshooting Demo Imports

You're trying to setup your theme but you're experiencing errors when importing the demo content? Or you've just followed the setup guide but your website doesn't look exactly like our demo? These are common issues for which you can find easy and quick fixes.

Happy With our Support So Far?

Feel free to review our theme on Themeforest! It helps us making our products more known to new potential customers, which allow us more time to improve the quality and develop new features. #SharingIsCaring ❤️

Discover MatchPress

Skip • Like • Super-Like

Add powerful matching features like Member likes, skips, super likes, conditional private messaging and much more.

Setup Your Cera or Gwangi powered Community Website and Turn it into an iOS and Android App

15% discount for Cera users

To unleash the full power of your Cera or Gwangi theme, we have partnered with the Zipline team. Your community website can now be fully setup and turned into your very own custom app for iOS and Android.

Whether you've newly acquired the theme or already got your site up and running, Zipline got you covered. And we got you an incredible discount.

Holiday, Weather & Festive effects
to pimp your WordPress Site