Find Answers and Get Support › Forums › Search › Search Results for 'adsense'
-
AuthorSearch Results
-
in reply to: Buddypress ads inside activity
MuamerParticipant@mllapan- 13 Topics
- 33 Posts
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.October 13, 2020 at 14:10 #24358in reply to: Buddypress ads inside activity
MuamerParticipant@mllapan- 13 Topics
- 33 Posts
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 calledflex
in the theme.October 6, 2020 at 13:23 #23993in reply to: Buddypress ads inside activity
MuamerParticipant@mllapan- 13 Topics
- 33 Posts
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/October 6, 2020 at 13:21 #23992in reply to: Bbpress topic page shows in full width, how to show sidebar?
MuamerParticipant@mllapan- 13 Topics
- 33 Posts
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.
October 2, 2020 at 15:17 #23835in reply to: adv/content in activity steam
@themosaurusrex- 0 Topics
- 2048 Posts
@youfriend Thank you for sharing your findings with the rest of us!
I went through the following posts:how to make this code work properly to put ads in buddypress activity
https://wordpress.org/support/topic/buddypress-ad-placements/I also stumbled upon this plugin but it has very few active installations and I haven’t had the chance to test it with Cera:
My conclusion is that there is not much we can do with our theme because I haven’t found any plugin or any simpler ways to achieve this. Any attempt to insert AdSense adds into the BuddyPress activity stream require custom coding…
Maybe this topic will spark others interest and we could decide in the future to implement this feature in a plugin ourselves if other community members upvote your request. So, I think that we should leave this open for further comments.
Please note that I took the liberty to move this topic to our Feature Requests forum. 🙂
July 13, 2020 at 16:31 #15199in reply to: Adsense code: issue on single post
@themosaurusrex- 0 Topics
- 2048 Posts
Hi @youfriend,
Thank you very much for sharing this tip with the rest of us! That’s very kind and I’m sure many people are trying to use AdSense with their website!
This will help for sure! #SharingIsCaring
July 9, 2020 at 16:40 #15017in reply to: adv/content in activity steam
@themosaurusrex- 0 Topics
- 2048 Posts
AdSense seams to be very JavaScript based and some other code is probably messing with your snippet. I have reached this conclusion after reading this:
https://www.wpbeginner.com/beginners-guide/how-to-add-google-adsense-to-your-wordpress-site/Do you have AdSense already activated on your website? And does it work in your sidebar widget areas?
Thank you.
July 8, 2020 at 11:46 #14927in reply to: WordPress Default Admin bar
@themosaurus- 1 Topics
- 1675 Posts
Hi NR,
Thank you for your feedback.
We’re really sorry to read that you’re find our product so disappointing. ?If you are new to WordPress projects, please be informed that themes like Gwangi only provide an appearance for WordPress and plugins features. If you find that some are missing, maybe you can look for new ways to enhance your website by adding/developing extra features yourself.
The two good places to start your search might be:
– WordPress plugins repository (https://wordpress.org/plugins/)
– CodeCanyon (https://codecanyon.net/)Also, to reply precisely to your various questions/remarks:
1) You can hide the WP admin bar displayed on your website, please go to your dashboard and navigate to “Settings > BuddyPress > Options”. There you will find the “Show the Toolbar for logged out users” option. Please uncheck to hide the toolbar.2) The WP login page is the standard way to log into your WordPress website and it’s not the role for the theme to change that as it’s part of the “Plugin Territory” rule. For more about this topic, please read the following post:
As theme authors, we comply to this rule and we recommend using a plugin to hide the default login page. You can achieve that by activating Login With AJAX to your website. For more about this plugin, please read the following support topic:
https://support.themosaurus.com/forums/topic/log-in/3) Google reCAPTCHA or other type of email verification are outside the scope of our product as they fall under the responsibility of the plugin developers (BuddyPress, bbPress, Contact Form 7, Login With AJAX, etc.) providing the submittable forms. Some are providing them natively, others require you to install additional plugins.
4) By looking for an AdSense widget for WordPress in the two websites recommended above, you may probably find one that will suit your needs.
We remain available for more help. If you have more precise questions regarding the installation, the setup or the use of Gwangi, please feel free to create new topic. We’ll be glad to provide you with more help.
Best regards,
July 24, 2018 at 16:49 #1384 -
AuthorSearch Results