• Resolved Mikhail Morfikov

    (@morfikov)


    I’m trying to put three different plugins wp-postratings, wp-print and wp-postviews into one line right under the post title. There’s no problem with wp-print and wp-postviews, but wp-postratings is a little bit tricky.

    I’ve changed div -> span in the wp-postratings.php file in the following line:

    ### Function: Display The Rating For The Post
    function the_ratings($start_tag = 'span', $custom_id = 0, $display = true) {

    and I got this result: http://i.imgur.com/eI7ti3q.png — that looks pretty decent. But before voting, there’s two lines instead of one: http://i.imgur.com/5sdQ0Tw.png , and I have no idea how to rewrite this to a single line. Without the span tag, it was even worse — three or four lines.

    How to change the 3-4 line rating into a single line rating?

    https://ww.wp.xz.cn/plugins/wp-postratings/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Lester Chan

    (@gamerz)

    What is the code you are using?

    Actually you don’t even need to touch the core plugin file

    You can just use this: <?php the_ratings( 'span' ); ?>, <?php the_views(); ?> and let me see your site URL AFTER that.

    Thread Starter Mikhail Morfikov

    (@morfikov)

    I’m using similar code:

    <div class="meta-header">
    		<div class="row">
    			<div class="col-xs-10">
    				Rating: <?php if(function_exists('the_ratings')) { the_ratings( 'span' ); } ?> , <?php if(function_exists('the_views')) { the_views(); } ?>
    			</div>
    			<div class="col-xs-2">
    				<div class="pull-right">
    					<?php if(function_exists('wp_print')) { print_link(); } ?>
    				</div>
    			</div>
    		</div>
    		</div>

    I restored the default plugin’s settings and added the span tag here, and yes, the line after voting met expectations. But the problem I described in my previous post stays the same, I mean there’s still 2 lines before voting.

    When you hover your mouse over one of the stars you get this: http://i.imgur.com/U6e4ilp.png — the text 1 star, 2 stars, etc appears. I looked into the firefox inspector, and I got the code: http://i.imgur.com/c67X1rB.png — the two br tags aren’t mine. I removed them from the inspector, and I got one single line, but without text separation, which looks like this: http://i.imgur.com/qwByJyI.png%5D .

    I hope this will help in some way. Maybe is there an option to remove the 1 star, 2 stars text altogether?

    Plugin Author Lester Chan

    (@gamerz)

    Check the WP-Admin -> Ratings -> Rating Templates to see if there is any breaking tags there.

    Thread Starter Mikhail Morfikov

    (@morfikov)

    This is it, thanks! 🙂

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Three wp-* plugins combined into one’ is closed to new replies.