I’m using X Theme Ethos stack demo 1. Just the regular blog roll version for my website.
I have a staging site for my news website:
Summary
https://ocmonitor.staging.wpengine.com/ my live site is OCMonitor.com for comparison.
A few months ago I was working on placing an ad zone on the front page between the featured post slider and the blog roll of posts.
It has been a while and I lack any coding skill so I can’t remember how I got to the solution I have on my staging site, but it looks like I ended up adding a template tag from my WP Pro Adverting plugin to a wp-index.php file and uploaded it to wp-content>themes>x-child>views>ethos. There is also an _index.php file in that same folder.
The code I added was this:
<?php echo do_shortcode("[pro_ad_display_adzone id= MY ZONE-ID]”); ?>That actually worked perfectly, or so I thought. It did exactly what I wanted it to do on desktop, but when I deployed the staging to my live site today the site all of the sudden went to full-width. Which wasn’t a problem, I jumped into the customizer and switched it to boxed layout and thought everything was fine.
However, and here is the problem I noticed, on mobile the content runs all the way to the edges of the screen. As I said, the only thing I did was add the template tag code to the wp-index.php file on the staging site.
How do I keep the ad zone where I want it and get the mobile version of my site from running to the edges of the screen?
Summary
<?php // ============================================================================= // VIEWS/ETHOS/WP-INDEX.PHP // ----------------------------------------------------------------------------- // Index page output for Ethos. // ============================================================================= $is_filterable_index = is_home() && x_get_option( 'x_ethos_filterable_index_enable' ) == 1; ?> <?php get_header(); ?><?php x_get_view( 'ethos', '_post', 'slider' ); ?>
<div class="offset cf">
<div class="<?php x_main_content_class(); ?>" role="main">
<?php echo do_shortcode("[pro_ad_display_adzone id=53705]"); ?>
<?php if ( $is_filterable_index ) : ?>
<?php x_get_view( 'ethos', '_index' ); ?>
<?php else : ?>
<?php x_get_view( 'global', '_index' ); ?>
<?php endif; ?>
</div>
<?php get_sidebar(); ?>
</div>
Thanks for the help.
BRATCH77

