Site logo

Archived topic

WP-PageNavi/Masonry

7 replies · Started by stardrive on September 10, 2015

Viewing posts 1–8 of 8

Hello Tom,

Please, I noticed that whenever I enable Masonry for the blog page, the Masonry blog is displayed correctly but WP-PageNavi control does not display. (I am OK with this if this is the way you made it to be).

Also, when i insert the code, <?php if(function_exists('the_ratings')) { the_ratings(); } ?> , for WP-PostRatings into index.php file, I noticed that the Masonry blog is not displayed correctly.

Regards,

Stardrive

Hi there,

When masonry is enabled, all page navigation is hidden and the More button is displayed to load more posts. You can use CSS to show the page navigation/hide the more button if needed.

As for the ratings code - it probably has to do with where you're inserting it into index.php. It most likely shouldn't go in there - you'll want to place it in GP Hooks.

Hello Tom,

I am OK with the page navigation being hidden and the More button being displayed.

Please, where in GP Hooks should I place the WP-PostRatings code?

Regards,

Stardrive

It depends on where you want it. Try out some of the hooks to see the placement.

Thank you.

I want the post ratings to appear for each post (just below the post meta) in the post archive page

Regards,

Stardrive

Try it in the "After Entry Title" hook.

You can also wrap it in this conditional to target the archives:

<?php if ( is_archive() ) : ?>
      Stuff in here
<?php endif; ?>

Hello Tom,

Thank you so much.

I placed the code below in the “After Entry Title” hook.
<?php if ( is_archive() ) : ?>
<?php if(function_exists('the_ratings')) { the_ratings(); } ?>
<?php endif; ?>

The WP-PostRatings is now showing below the Post Title.
But, initially, it was showing only in the post categories pages; it was not showing in the Blog page. So, I also added this code in the “After Entry Title” hook.
<?php if( is_home() ):?>
<?php if(function_exists('the_ratings')) { the_ratings(); } ?>
<?php endif;?>

The WP-PostRatings is now showing below the Post Title in both the Blog page and the post categories pages

Regards,

Stardrive

Perfect :)

This archived topic is closed to new replies.