• Resolved pisang20

    (@pisang20)


    Hey.

    I really like your plugin. Its so simple and nothing extra πŸ™‚ However I have one issue I’d like to be solved. I’m not sure if its something to do with my theme or its by default. The button is everywhere it shoukld be but it is also displayed bottom of page. See picture here: http://prntscr.com/5t7g89

    If its possible to remove that. That would be awesome

    Thank you in advance, Sir! πŸ™‚

    https://wordpress.org/plugins/thumbs-rating/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Ricard Torres

    (@quicoto)

    Since the placement of the buttons is manual it probably can be fixed.

    How did you install the buttons? What code did you use and where ?

    Thread Starter pisang20

    (@pisang20)

    function thumbs_rating_print($content)
    {
    	return $content.thumbs_rating_getlink();
    }
    add_filter('the_content', 'thumbs_rating_print');

    In function.php child theme.

    Thank you for your quick notice πŸ™‚

    Plugin Author Ricard Torres

    (@quicoto)

    Right, so perhaps this is not the best method for you, for your specific theme.

    If you could locate where those posts appear (the loop where they get printed) in your theme, it would probably fix the issue.

    Use the C method to add the Thumbs buttons: https://wordpress.org/plugins/thumbs-rating/installation/

    Thread Starter pisang20

    (@pisang20)

    I’m not good at the loop thing as I’ve learned coding for 2 months only. I know css, css3 and lilbit javascript πŸ˜€ at the moment I’m lilbit confused and not sure where to add this <?=function_exists('thumbs_rating_getlink') ? thumbs_rating_getlink() : ''?>

    Plugin Author Ricard Torres

    (@quicoto)

    hmmm it’s going to be hard then. I can no guess which file is it, since every theme is different. You should try to find the place where each post is printed.

    Try looking for the_title or the_content

    Then there’s gotta be a loop (a while probably), put the Thumbs Rating code inside that while, after the the_content function.

    Good luck !

    Thread Starter pisang20

    (@pisang20)

    I found something like that in the main index.php

    <div id="posts-container" class="<?php echo $container_class; ?> clearfix">
    			<?php
    			$post_count = 1;
    
    			$prev_post_timestamp = null;
    			$prev_post_month = null;
    			$prev_post_year = null;
    			$first_timeline_loop = false;
    
    			while(have_posts()): the_post();
    				$post_timestamp = strtotime($post->post_date);
    				$post_month = date('n', $post_timestamp);
    				$post_year = get_the_date('o');
    				$current_date = get_the_date('o-n');

    Anything close ?:D Thank you for supporting me. Btw I’m using avada theme, if that helps

    Plugin Author Ricard Torres

    (@quicoto)

    Sure, try pasting the code after

    current_date = get_the_date('o-n');

    And see how it goes.

    Thread Starter pisang20

    (@pisang20)

    <?php
    			$post_count = 1;
    
    			$prev_post_timestamp = null;
    			$prev_post_month = null;
    			$prev_post_year = null;
    			$first_timeline_loop = false;
    
    			while(have_posts()): the_post();
    				$post_timestamp = strtotime($post->post_date);
    				$post_month = date('n', $post_timestamp);
    				$post_year = get_the_date('o');
    				$current_date = get_the_date('o-n');
    <?=function_exists('thumbs_rating_getlink') ? thumbs_rating_getlink() : ''?>
    			?>

    like that it doesnt show at all :S any more suggestions ?:)

    Thread Starter pisang20

    (@pisang20)

    also found this in the blog.php

    //do the loop
    		if ( $fusion_query->have_posts() ) : while ( $fusion_query->have_posts() ) : $fusion_query->the_post();
    
    			$this->post_id = get_the_ID();
    
    			if(	self::$args['layout'] == 'timeline' ) {
    				$post_timestamp = strtotime( get_the_date() );
    				$this->post_month = date( 'n', $post_timestamp );
    				$this->post_year = get_the_date( 'o' );
    				$current_date = get_the_date( 'o-n' );
    
    				$date_params['prev_post_month'] = $prev_post_month;
    				$date_params['post_month'] = $this->post_month;
    				$date_params['prev_post_year'] = $prev_post_year;
    				$date_params['post_year'] = $this->post_year;				
    
    				ob_start();
    				do_action( 'fusion_blog_shortcode_timeline_date', $date_params );
    
    				do_action( 'fusion_blog_shortcode_before_loop_timeline' );
    				$before_loop_timeline_action = ob_get_contents();
    				ob_get_clean();		
    
    				$html .= $before_loop_timeline_action;
    
    			} else {
    
    				ob_start();
    				do_action( 'fusion_blog_shortcode_before_loop' );
    				$before_loop_action = ob_get_contents();
    				ob_get_clean();		
    
    				$html .= $before_loop_action;
    
    			}

    I tried to add here the same place I did before but that broke the website. Giving me blank page with error.

    Plugin Author Ricard Torres

    (@quicoto)

    For the first issue, it’s a PHP syntax problem. It should be like:

    <?php
    			$post_count = 1;
    
    			$prev_post_timestamp = null;
    			$prev_post_month = null;
    			$prev_post_year = null;
    			$first_timeline_loop = false;
    
    			while(have_posts()): the_post();
    				$post_timestamp = strtotime($post->post_date);
    				$post_month = date('n', $post_timestamp);
    				$post_year = get_the_date('o');
    				$current_date = get_the_date('o-n'); ?>
                                   <?=function_exists('thumbs_rating_getlink') ? thumbs_rating_getlink() : ''?>

    For the blog file, you could try something like:

    //do the loop
    		if ( $fusion_query->have_posts() ) : while ( $fusion_query->have_posts() ) : $fusion_query->the_post();
    
    			$this->post_id = get_the_ID();
    
    			if(	self::$args['layout'] == 'timeline' ) {
    				$post_timestamp = strtotime( get_the_date() );
    				$this->post_month = date( 'n', $post_timestamp );
    				$this->post_year = get_the_date( 'o' );
    				$current_date = get_the_date( 'o-n' );
    
    				$date_params['prev_post_month'] = $prev_post_month;
    				$date_params['post_month'] = $this->post_month;
    				$date_params['prev_post_year'] = $prev_post_year;
    				$date_params['post_year'] = $this->post_year;				
    
    				ob_start();
    				do_action( 'fusion_blog_shortcode_timeline_date', $date_params );
    
    				do_action( 'fusion_blog_shortcode_before_loop_timeline' );
    				$before_loop_timeline_action = ob_get_contents();
    				ob_get_clean();		
    
                                     if ( function_exists('thumbs_rating_getlink') ) { echo thumbs_rating_getlink(); }
    
    				$html .= $before_loop_timeline_action;
    
    			} else {
    
    				ob_start();
    				do_action( 'fusion_blog_shortcode_before_loop' );
    				$before_loop_action = ob_get_contents();
    				ob_get_clean();		
    
    				$html .= $before_loop_action;
    
    			}
    Thread Starter pisang20

    (@pisang20)

    Nothing πŸ™ I think Im already annoying you. But if you have time and can take a look. I can post website credientals. If you do, please provide me your email address.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘button on the bottom of page’ is closed to new replies.