How to do Fixed width of discourse theme, No mobile view? [paid]


(Veer) #1

Problem is we use adsense for long time to finance our work. After moving to discourse The CPC and click rate is almost 5 times less. In old site we have a single theme which always opens a Desktop view, eigther in mobile or in Latop, thus gives High CPC. This discourse theme is responsive, i need to use here Responsive ad, how can i do the fixed Desktop view and width for every device ? Disable the theme responsiveness.

  • Computer view CPC is much higher than mobile ads.
  • Mobile view should be disabled and responsiveness too.

(Jide Ogunsanya) #2

You can set your responsive adsense ad to display any size for any device width. eg, you can force it to display 330x250 ad above fold on mobile.


(Mittineague) #3

@jidetheblogger Your article is about blogs, how did you do this in your Discourse? i.e.

<style>
.OBResponsiveTop { width: 300px; height: 250px; }
@media(min-width: 500px) { .OBResponsiveTop { width: 468px; height: 60px; } }
@media(min-width: 800px) { .OBResponsiveTop { width: 728px; height: 90px; } }
</style>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<div style='display:block;text-align: center'>
<!-- OBResponsiveTop -->
<ins class="adsbygoogle OBResponsiveTop"
     style="display:inline-block"
     data-ad-client="ca-pub-XXXXXXX11XXX9"
     data-ad-slot="7XXXXX1"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>

(Veer) #4

I want to disable the Total theme responsiveness of the discourse website. Not the adsense.
Check these two sites of wordpress with same theme where i disables the responsiveness.

usbar1.com - Not responsive and looks same on mobile or desktop.
collegeuniversitydb.com - Responsive which looks difeerent on mobile and desktop.

How can i do the same in Discourse. Fix the site width and disable responsiveness of the whole website.


(Joffrey Jaffeux) #5

Hi @veer,

I’m not sure I understand your requirement, but maybe this simple fix would be enough for you:

For reference and copy/paste, the css used:

.wrap {
    min-width: 960px;
}

(Veer) #6

Joffrey That really helped me, But the problem now is, I cab not zoom out from the page in mobiles. How to fix that ?


(Joffrey Jaffeux) #7

Put this in Customize > Themes > Common > </head>, that should do it:

<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=10.0; user-scalable=1;" />

(Veer) #8

Thanks that worked perfectly.


(system) #9

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.