mataylorusa
Forum Replies Created
-
Thanks Max! I disabled the Minit plugin and the widget is now sticky again. Love your plugin so I’m glad that was the fix.
Thanks for the support!
The site is diyshareable.com and the it’s the last widget in the sidebar with ads (300×600).
Thanks!
Thanks for the timely response, Max.
I forgot to mention in my first post that purging all caches is the first thing I tried.
I will try deleting and recreating the widget again in the off chance that has an effect.
Any other ideas to try?
Thanks for the timely response, Max.
I forgot to mention in my first post that purging all caches is the first thing I tried.
I will try deleting and recreating the widget again in the off chance that has an effect.
Any other suggestions?
This is now resolved. I tried every single line in the top part of my single.php template until it worked. Thanks.
I just messaged you via your contact form on your website. Thanks.
Not only did I try your function before the “single-featured-thumbnail” element, I tried it in numerous other spots with no success. After every new attempt, I cleared my site’s cache as well as used incognito browsing before checking results.
That’s why I provide my single.php template to see if I was missing something or if another function needed to be included.
Unless you have other suggestions, I guess I will assume that Ad Inserter will not work in this instance. Thanks.
Thanks for the PHP function info. I tried to insert it everywhere that I thought would be appropriate to have code block # 1 show up below the post title and above the featured image.
In the single.php template below, could you please tell me where to specifically insert the suggested php function?
Thanks in advance:
<?php get_header(); ?>
<?php $mts_options = get_option(MTS_THEME_NAME); ?>
<div id=”page” class=”<?php mts_single_page_class(); ?>”>
<?php dynamic_sidebar(‘Header Ad’); ?>
<article class=”<?php mts_article_class(); ?>” itemscope itemtype=”http://schema.org/BlogPosting”>
<?php if (mts_get_thumbnail_url()) : ?>
<span itemprop=”image” itemscope itemtype=”http://schema.org/ImageObject”>
<?php $image_data = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID() ), ‘featured’ ); ?>
<meta itemprop=”url” content=”<?php echo esc_url( mts_get_thumbnail_url() ); ?>” />
<meta itemprop=”width” content=”<?php echo esc_attr( $image_data[1] ); ?>” />
<meta itemprop=”height” content=”<?php echo esc_attr( $image_data[2] ); ?>” />
</span>
<?php endif; ?>
<div id=”content_box” itemprop=”mainEntityOfPage”>
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<div id=”post-<?php the_ID(); ?>” <?php post_class(‘g post’); ?>>
<?php if ($mts_options[‘mts_breadcrumb’] == ‘1’) { ?>
<div class=”breadcrumb” xmlns:v=”http://rdf.data-vocabulary.org/#”><?php mts_the_breadcrumb(); ?></div>
<?php } ?>
<?php
// Single post parts ordering
if ( isset( $mts_options[‘mts_single_post_layout’] ) && is_array( $mts_options[‘mts_single_post_layout’] ) && array_key_exists( ‘enabled’, $mts_options[‘mts_single_post_layout’] ) ) {
$single_post_parts = $mts_options[‘mts_single_post_layout’][‘enabled’];
} else {
$single_post_parts = array( ‘content’ => ‘content’, ‘related’ => ‘related’, ‘author’ => ‘author’ );
}
foreach( $single_post_parts as $part => $label ) {
switch ($part) {
case ‘content’:
?>
<div class=”single_post”>
<header>
<h1 class=”title single-title entry-title” itemprop=”headline”><?php the_title(); ?></h1>
<?php mts_the_postinfo( ‘single’ ); ?>
</header><!–.headline_area–>
<?php $header_animation = mts_get_post_header_effect();
$sidebar = mts_custom_sidebar();
if ( ‘parallax’ === $header_animation ) {
if (mts_get_thumbnail_url()) : ?>
<div id=”parallax” <?php echo ‘style=”background-image: url(‘.mts_get_thumbnail_url().’);”‘; ?>></div>
<?php endif;
} else if ( ‘zoomout’ === $header_animation ) {
if (mts_get_thumbnail_url()) : ?>
<div id=”zoom-out-effect”><div id=”zoom-out-bg” <?php echo ‘style=”background-image: url(‘.mts_get_thumbnail_url().’);”‘; ?>></div></div>
<?php endif;
} elseif ( $sidebar != ‘mts_nosidebar’ && !empty($mts_options[‘mts_single_featured_image’]) && has_post_thumbnail()) { ?>
<div class=”single-featured-thumbnail”>
<?php the_post_thumbnail(‘featuredfull’,array(‘title’ => ”)); ?>
</div>
<?php } ?>
<div class=”post-single-content box mark-links entry-content”>
<?php if ($mts_options[‘mts_posttop_adcode’] != ”) { ?>
<?php $toptime = $mts_options[‘mts_posttop_adcode_time’]; if (strcmp( date(“Y-m-d”, strtotime( “-$toptime day”)), get_the_time(“Y-m-d”) ) >= 0) { ?>
<div class=”topad”>
<?php echo do_shortcode($mts_options[‘mts_posttop_adcode’]); ?>
</div>
<?php } ?>
<?php } ?>
<?php if (isset($mts_options[‘mts_social_button_position’]) && $mts_options[‘mts_social_button_position’] == ‘top’) mts_social_buttons(); ?>
<div class=”thecontent” itemprop=”articleBody”>
<?php the_content(); ?>
</div>
<?php wp_link_pages(array(‘before’ => ‘<div class=”pagination”>’, ‘after’ => ‘</div>’, ‘link_before’ => ‘<span class=”current”><span class=”currenttext”>’, ‘link_after’ => ‘</span></span>’, ‘next_or_number’ => ‘next_and_number’, ‘nextpagelink’ => ‘<i class=”fa fa-angle-right”></i>’, ‘previouspagelink’ => ‘<i class=”fa fa-angle-left”></i>’, ‘pagelink’ => ‘%’,’echo’ => 1 )); ?>
<?php if ($mts_options[‘mts_postend_adcode’] != ”) { ?>
<?php $endtime = $mts_options[‘mts_postend_adcode_time’]; if (strcmp( date(“Y-m-d”, strtotime( “-$endtime day”)), get_the_time(“Y-m-d”) ) >= 0) { ?>
<div class=”bottomad”>
<?php echo do_shortcode($mts_options[‘mts_postend_adcode’]); ?>
</div>
<?php } ?>
<?php } ?>
<?php if (isset($mts_options[‘mts_social_button_position’]) && $mts_options[‘mts_social_button_position’] !== ‘top’) mts_social_buttons(); ?>
</div><!–.post-single-content–>
</div><!–.single_post–>
<?php
break;case ‘tags’:
?>
<div class=”tags”>
<?php mts_the_tags(‘<span class=”tagtext”>’.__(‘Tags’,’mythemeshop’).’:</span>’,’, ‘) ?>
</div>
<?php
break;case ‘author’:
?>
<div class=”postauthor”>
<?php if(function_exists(‘get_avatar’)) { echo get_avatar( get_the_author_meta(’email’), ‘100’ ); } ?>
<div class=”author-wrap”>
<h5 class=”vcard”>” rel=”nofollow” class=”fn”><?php the_author_meta( ‘nickname’ ); ?></h5>
<p><?php the_author_meta(‘description’) ?></p>
</div>
</div>
<?php
break;case ‘related’:
mts_related_posts();
dynamic_sidebar(‘Related Ad’);
break;
}
} ?>
</div><!–.g post–>
<?php comments_template( ”, true ); ?>
<?php endwhile; /* end loop */ ?>
</div>
</article>
<?php get_sidebar(); ?>
<?php get_footer(); ?>