• Resolved cuthza

    (@cuthza)


    Hi, I want to use the share bar from Hueman. I have installed the addon pack, but when I enable it, the bar doesn’t appear.

    I know it has something to do with my child theme, because as soon as I disable it, the bar appears. Problem is, I don’t know what to do about it!

    If you could help that would be awesome, thanks!

    Site is here: subedit.co.za

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi cuthza. I just checked your site and the sharebar is being displayed on the individual posts. Were you able to solve the issue?

    Thread Starter cuthza

    (@cuthza)

    Nope, I deleted my child theme as it was super old.

    Here are the contents of the edits I had made in the child theme. If you can see what was causing the problem that would be so useful.

    Stylesheet

    /* Global */
    .mystyle {}
    
    /* Tablet - 800px, 768px & 720px */
    @media only screen and (min-width: 720px) and (max-width: 800px) {
    	.mystyle {}
    }
    
    /* Mobile - 480px & 320px */
    @media only screen and (max-width: 719px) {
    	.mystyle {}
    .search-expand {
            left: 55px !important;
            right: auto;
            top: 0 !important;
            width: 320px;
        }
    }
    
    /* Mobile - 320px */
    @media only screen and (max-width: 479px) {
    	.mystyle {}
    }
    
    /* Fonts */
    
    	.entry {
    		color: #222;
    		font-family: PT Serif, Latin-Ext;
    		font-size: 19px;
    
    }
    
    	.entry.excerpt {
    		color: #222;
    }
    
    /* Other */
    
    /* set topbar to fixed instead of scroll */
    
    .full-width #nav-topbar.nav-container {
        position: initial;
    }
    .full-width.topbar-enabled #header {
        padding-top: 0;
    }
    
    /* Byline Avatar Style */
    
    /* position avatar next to post byline */
    
    .single .byline-avatar {
        float: left;
        margin: 0 1px 12px 0;
        width: 64px;
        height: auto;
        position: relative;
    }
    
    /* make byline avatar a circle */
    
    .single .byline-avatar img {
        width: 80%;	/* adjust size of image if needed */
        height: auto;
        float: left;
        margin-right: 10px;	/* adjust space around image */
        border-radius: 50%;
        -webkit-shape-outside:circle();
        shape-outside:circle();
    }
    
    /* push byline down to center vertcally on avatar */
    
    .single .post-byline {
        margin-top: 22px;
    }
    
    /* move search box to navigation bar */
    .search-expand {
        right: 55px;
        left: auto;
        top: -50px;
        width: 320px;
    }
    .search-expand-inner {
        padding: 5px;
    }
    
    /* related posts settings */
    
    div#jp-relatedposts div.jp-relatedposts-items-visual .jp-relatedposts-post {
    	filter: alpha(opacity=100);
    	-moz-opacity: 1;
    	opacity: 1;
    }
    div#jp-relatedposts div.jp-relatedposts-items div.jp-relatedposts-post:hover {
    	filter: alpha(opacity=80);
    	-moz-opacity: 0.8;
    	opacity: 0.8;
    }
    
    #jp-relatedposts {
    	font-family: Arial;
    
    }
    
    #jp-relatedposts h3.jp-relatedposts-headline em {
    	font-size: 20px;
    
    }
    
    #jp-relatedposts .jp-relatedposts-items-visual h4.jp-relatedposts-post-title {
    	font-size: 16px;
    	padding-top: 5px;
    
    }
    
    /* white caption borders */
    
    .entry .wp-caption {
    	background: white;
    
    }
    
    /* caption text alignment */
    
    .entry .wp-caption-text {
    	text-align: left;
    	padding: 0 0 8px 8px;
    }

    Functions

    function featuredtoRSS($content) {
    global $post;
    if ( has_post_thumbnail( $post->ID ) ){
    $content = '<div>' . get_the_post_thumbnail( $post->ID, 'large', array( 'style' => 'margin-bottom: 15px;' ) ) . '</div>' . $content;
    }
    return $content;
    }
    
    add_filter('the_excerpt_rss', 'featuredtoRSS');
    add_filter('the_content_feed', 'featuredtoRSS');
    
    function no_self_ping( &$links ) {
    	$home = get_option( 'home' );
    	foreach ( $links as $l => $link )
    		if ( 0 === strpos( $link, $home ) )
    			unset($links[$l]);
    }
    
    add_action( 'pre_ping', 'no_self_ping' );
    
    ?>

    Single

    <?php get_header(); ?>
    
    <section class="content">
    
    	<?php get_template_part('inc/page-title'); ?>
    
    	<div class="pad group">
    
    		<?php while ( have_posts() ): the_post(); ?>
    			<article <?php post_class(); ?>>
    				<div class="post-inner group">
    
    					<h1 class="post-title"><?php the_title(); ?></h1>
    					<p class="byline-avatar"><?php echo get_avatar(get_the_author_meta('user_email'),'128'); ?></p>
    					<p class="post-byline"><?php _e('by','hueman'); ?> <?php the_author_posts_link(); ?> · <?php the_time(get_option('date_format')); ?></p>
    
    					<?php if( get_post_format() ) { get_template_part('inc/post-formats'); } ?>
    
    					<div class="clear"></div>
    
    					<div class="entry <?php if ( ot_get_option('sharrre') != 'off' ) { echo 'share'; }; ?>">
    						<div class="entry-inner">
    							<?php the_content(); ?>
    							<?php wp_link_pages(array('before'=>'<div class="post-pages">'.__('Pages:','hueman'),'after'=>'</div>')); ?>
    						</div>
    						<?php if ( ot_get_option('sharrre') != 'off' ) { get_template_part('inc/sharrre'); } ?>
    						<div class="clear"></div>
    					</div><!--/.entry-->
    
    				</div><!--/.post-inner-->
    			</article><!--/.post-->
    		<?php endwhile; ?>
    
    		<div class="clear"></div>
    
    		<?php the_tags('<p class="post-tags"><span>'.__('Tags:','hueman').'</span> ','','</p>'); ?>
    
    		<?php if ( ( ot_get_option( 'author-bio' ) != 'off' ) && get_the_author_meta( 'description' ) ): ?>
    			<div class="author-bio">
    				<div class="bio-avatar"><?php echo get_avatar(get_the_author_meta('user_email'),'128'); ?></div>
    				<p class="bio-name"><?php the_author_meta('display_name'); ?></p>
    				<p class="bio-desc"><?php the_author_meta('description'); ?></p>
    				<div class="clear"></div>
    			</div>
    		<?php endif; ?>
    
    		<?php if ( ot_get_option( 'post-nav' ) == 'content') { get_template_part('inc/post-nav'); } ?>
    
    		<?php if ( ot_get_option( 'related-posts' ) != '1' ) { get_template_part('inc/related-posts'); } ?>
    
    		<?php if ( ot_get_option('post-comments') != 'off' ) { comments_template('/comments.php',true); } ?>
    
    	</div><!--/.pad-->
    
    </section><!--/.content-->
    
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>

    I don’t see anything in your CSS that would be a direct conflict. There might be an issue with your function returning the content. But my first inclination would be that your child theme single.php file is out of date. There have been changes in the v3.x files, both in naming conventions and in file locations. For example, this line:

    <?php get_template_part('inc/page-title'); ?>

    is now this:

    <?php get_template_part('parts/page-title'); ?>

    The first thing I’d suggest is making a note of the modifications you made in single.php (and any other theme templates you have in your child theme), copy the new versions of those files to your child theme (overwriting the old versions) and then reapply your changes. Then disable your function and see if you can get your new child theme single.php to work. After that, then reactivate your function and modify it if needed.

    Thread Starter cuthza

    (@cuthza)

    Thanks, will do so.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Share bar not appearing’ is closed to new replies.