How to fix layout issues of JReviews content in certain WordPress themes

From JReviews Documentation
Revision as of 11:39, 3 September 2014 by Jreviews (Talk | contribs) (Created page with " If sidebar widgets on your site are displaying below the content only on JReviews pages, it means that the WordPress theme you are using requires a custom jreviews.php template ...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

If sidebar widgets on your site are displaying below the content only on JReviews pages, it means that the WordPress theme you are using requires a custom jreviews.php template file for JReviews pages.

To create this file, copy the page.php theme file from your WP theme:

ROOT/wp-content/themes/YOUR-THEME/page.php

and rename the copy to jreviews.php:

ROOT/wp-content/themes/YOUR-THEME/jreviews.php


edit that file and replace the existing content area while loop code with this code:


<?php echo get_query_var('output');?>

Here is an example of the page.php code in the Twenty Twelve theme: Wp-jreviews-theme.png

and this is how it looks after replacing the code in the jreviews.php file: Wp-jreviews-theme2.png

You can leave the jreviews.php file in your main WP theme folder, but if you have a child theme, you can move it there: ROOT/wp-content/themes/YOUR-THEME-child/jreviews.php


If you don't have a child theme, you can move the file to jreviews_overrides:

ROOT/jreviews_overrides/wp-theme/jreviews.php

JReviews will look for that file in this order:

ROOT/jreviews_overrides/wp-theme/jreviews.php ROOT/wp-content/themes/YOUR-THEME-child/jreviews.php ROOT/wp-content/themes/YOUR-THEME/jreviews.php