- TutorialsDefault Block Settings Guide
Hi, just some thoughts (kinda busy this week…),
– Is it suitable for you to have a direct conversion from 0-5 in 0.5 steps to 0-20? (0=>0, 0.5=>2, 1=>4,1.5=>6….) In this case you could only review even values on the 0-20 scale.
Then, you could add save_post action in your child theme and check whether a review exists, do the conversion, and store the result in a convenient way as a post_meta.
Please note td review meta is an array so if you want to extract the values from the database, you would have to do it with a php script or similar but, if you store your own meta value, then this value can already be a number, and this will be easier.
to summarize:
add_action ('save_post','test_save_post',10,3);
function test_save_post ($post_id, $post, $update )
{
if (isset ($_POST['td_review']) && isset ($_POST['td_review']['p_review_stars']) &&
count ($_POST['td_review']['p_review_stars'])){
$my_value = $_POST['td_review']['p_review_stars'][0]['rate']*4;
update_post_meta ($post_id,'my_review',$my_value);// got even 0-20 numbers in 'my_review' meta. select post_id,meta_value from wp_postmeta where meta_key = 'my_review'
}
}
If you check your meta table, you will see a new meta attached to the post with your review.
– No way, I need the odd numbers from 0 to 20. There are several alternatives here, some involving php code and other javascript code but it gets more difficult than previous approach. To avoid waste both your and my time, if you are interested, reply to this post and I will give you some hints.
regards
Thanks @unplug.tips! Glad that we could help and that you’re satisfied using our theme. We do our best to support and improve our products so we’re delighted to find that we have managed to pleased them from their messages or their reviews.
Thanks again!
Hi,
You’re right, you can’t edit it using child theme however you can change it into the main theme if you really need it and modify theme’s review system and considering that the booster functions file is a core file it will be updated frequently so you would have to also constantly change it each update even if you use a child theme.
Thanks
I want to create a child theme which will allow the NewsMag Product Ratings to be entered in wp-admin on a points scale of 0 to 20 but displayed on the post page as a star rating between 0 and 5. The reason for this is that I want to be able to export the ratings data to another application which supports ratings on a scale of 0 to 20. I can’t see any easy way of doing this. td_set_reviews.php can’t be modified from a child theme because it is used from within td_templates_settings.php which is included from functions.php using require_once. So effectively the ratings functionality is not pluggable.
Is there any way around this?
This is my htaccess code
=================================================
# ———————————————————————-
# CORS-enabled images (@crossorigin)
# ———————————————————————-
# Send CORS headers if browsers request them; enabled by default for images.
# developer.mozilla.org/en/CORS_Enabled_Image
# blog.chromium.org/2011/07/using-cross-domain-images-in-webgl-and.html
# hacks.mozilla.org/2011/11/using-cors-to-load-webgl-textures-from-cross-domain-images/
# wiki.mozilla.org/Security/Reviews/crossoriginAttribute
<IfModule mod_setenvif.c>
<IfModule mod_headers.c>
# mod_headers, y u no match by Content-Type?!
<FilesMatch “\.(gif|png|jpe?g|svg|svgz|ico|webp)$”>
SetEnvIf Origin “:” IS_CORS
Header set Access-Control-Allow-Origin “*” env=IS_CORS
</FilesMatch>
</IfModule>
</IfModule>
# ———————————————————————-
# Webfont access
# ———————————————————————-
# Allow access from all domains for webfonts.
# Alternatively you could only whitelist your
# subdomains like “subdomain.example.com”.
<IfModule mod_headers.c>
<FilesMatch “\.(ttf|ttc|otf|eot|woff?|font.css|css)$”>
Header set Access-Control-Allow-Origin “*”
</FilesMatch>
</IfModule>
RewriteEngine on
# BEGIN W3TC Browser Cache
<IfModule mod_mime.c>
AddType text/css .css
AddType text/x-component .htc
AddType application/x-javascript .js
AddType application/javascript .js2
AddType text/javascript .js3
AddType text/x-js .js4
AddType text/html .html .htm
AddType text/richtext .rtf .rtx
AddType image/svg+xml .svg .svgz
AddType text/plain .txt
AddType text/xsd .xsd
AddType text/xsl .xsl
AddType text/xml .xml
AddType video/asf .asf .asx .wax .wmv .wmx
AddType video/avi .avi
AddType image/bmp .bmp
AddType application/java .class
AddType video/divx .divx
AddType application/msword .doc .docx
AddType application/vnd.ms-fontobject .eot
AddType application/x-msdownload .exe
AddType image/gif .gif
AddType application/x-gzip .gz .gzip
AddType image/x-icon .ico
AddType image/jpeg .jpg .jpeg .jpe
AddType application/json .json
AddType application/vnd.ms-access .mdb
AddType audio/midi .mid .midi
AddType video/quicktime .mov .qt
AddType audio/mpeg .mp3 .m4a
AddType video/mp4 .mp4 .m4v
AddType video/mpeg .mpeg .mpg .mpe
AddType application/vnd.ms-project .mpp
AddType application/x-font-otf .otf
AddType application/vnd.ms-opentype .otf
AddType application/vnd.oasis.opendocument.database .odb
AddType application/vnd.oasis.opendocument.chart .odc
AddType application/vnd.oasis.opendocument.formula .odf
AddType application/vnd.oasis.opendocument.graphics .odg
AddType application/vnd.oasis.opendocument.presentation .odp
AddType application/vnd.oasis.opendocument.spreadsheet .ods
AddType application/vnd.oasis.opendocument.text .odt
AddType audio/ogg .ogg
AddType application/pdf .pdf
AddType image/png .png
AddType application/vnd.ms-powerpoint .pot .pps .ppt .pptx
AddType audio/x-realaudio .ra .ram
AddType application/x-shockwave-flash .swf
AddType application/x-tar .tar
AddType image/tiff .tif .tiff
AddType application/x-font-ttf .ttf .ttc
AddType application/vnd.ms-opentype .ttf .ttc
AddType audio/wav .wav
AddType audio/wma .wma
AddType application/vnd.ms-write .wri
AddType application/font-woff .woff
AddType application/vnd.ms-excel .xla .xls .xlsx .xlt .xlw
AddType application/zip .zip
</IfModule>
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/css A31536000
ExpiresByType text/x-component A31536000
ExpiresByType application/x-javascript A31536000
ExpiresByType application/javascript A31536000
ExpiresByType text/javascript A31536000
ExpiresByType text/x-js A31536000
ExpiresByType text/html A3600
ExpiresByType text/richtext A3600
ExpiresByType image/svg+xml A3600
ExpiresByType text/plain A3600
ExpiresByType text/xsd A3600
ExpiresByType text/xsl A3600
ExpiresByType text/xml A3600
ExpiresByType video/asf A31536000
ExpiresByType video/avi A31536000
ExpiresByType image/bmp A31536000
ExpiresByType application/java A31536000
ExpiresByType video/divx A31536000
ExpiresByType application/msword A31536000
ExpiresByType application/vnd.ms-fontobject A31536000
ExpiresByType application/x-msdownload A31536000
ExpiresByType image/gif A31536000
ExpiresByType application/x-gzip A31536000
ExpiresByType image/x-icon A31536000
ExpiresByType image/jpeg A31536000
ExpiresByType application/json A31536000
ExpiresByType application/vnd.ms-access A31536000
ExpiresByType audio/midi A31536000
ExpiresByType video/quicktime A31536000
ExpiresByType audio/mpeg A31536000
ExpiresByType video/mp4 A31536000
ExpiresByType video/mpeg A31536000
ExpiresByType application/vnd.ms-project A31536000
ExpiresByType application/x-font-otf A31536000
ExpiresByType application/vnd.ms-opentype A31536000
ExpiresByType application/vnd.oasis.opendocument.database A31536000
ExpiresByType application/vnd.oasis.opendocument.chart A31536000
ExpiresByType application/vnd.oasis.opendocument.formula A31536000
ExpiresByType application/vnd.oasis.opendocument.graphics A31536000
ExpiresByType application/vnd.oasis.opendocument.presentation A31536000
ExpiresByType application/vnd.oasis.opendocument.spreadsheet A31536000
ExpiresByType application/vnd.oasis.opendocument.text A31536000
ExpiresByType audio/ogg A31536000
ExpiresByType application/pdf A31536000
ExpiresByType image/png A31536000
ExpiresByType application/vnd.ms-powerpoint A31536000
ExpiresByType audio/x-realaudio A31536000
ExpiresByType image/svg+xml A31536000
ExpiresByType application/x-shockwave-flash A31536000
ExpiresByType application/x-tar A31536000
ExpiresByType image/tiff A31536000
ExpiresByType application/x-font-ttf A31536000
ExpiresByType application/vnd.ms-opentype A31536000
ExpiresByType audio/wav A31536000
ExpiresByType audio/wma A31536000
ExpiresByType application/vnd.ms-write A31536000
ExpiresByType application/font-woff A31536000
ExpiresByType application/vnd.ms-excel A31536000
ExpiresByType application/zip A31536000
</IfModule>
<IfModule mod_deflate.c>
<IfModule mod_headers.c>
Header append Vary User-Agent env=!dont-vary
</IfModule>
AddOutputFilterByType DEFLATE text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon application/json
<IfModule mod_mime.c>
# DEFLATE by extension
AddOutputFilter DEFLATE js css htm html xml
</IfModule>
</IfModule>
<FilesMatch “\.(css|htc|less|js|js2|js3|js4|CSS|HTC|LESS|JS|JS2|JS3|JS4)$”>
<IfModule mod_headers.c>
Header set Pragma “public”
Header append Cache-Control “public”
Header set X-Powered-By “W3 Total Cache/0.9.4.1”
</IfModule>
</FilesMatch>
<FilesMatch “\.(html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml|HTML|HTM|RTF|RTX|SVG|SVGZ|TXT|XSD|XSL|XML)$”>
<IfModule mod_headers.c>
Header set Pragma “public”
Header append Cache-Control “public”
Header set X-Powered-By “W3 Total Cache/0.9.4.1”
</IfModule>
</FilesMatch>
<FilesMatch “\.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|json|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|ttf|ttc|wav|wma|wri|woff|xla|xls|xlsx|xlt|xlw|zip|ASF|ASX|WAX|WMV|WMX|AVI|BMP|CLASS|DIVX|DOC|DOCX|EOT|EXE|GIF|GZ|GZIP|ICO|JPG|JPEG|JPE|JSON|MDB|MID|MIDI|MOV|QT|MP3|M4A|MP4|M4V|MPEG|MPG|MPE|MPP|OTF|ODB|ODC|ODF|ODG|ODP|ODS|ODT|OGG|PDF|PNG|POT|PPS|PPT|PPTX|RA|RAM|SVG|SVGZ|SWF|TAR|TIF|TIFF|TTF|TTC|WAV|WMA|WRI|WOFF|XLA|XLS|XLSX|XLT|XLW|ZIP)$”>
<IfModule mod_headers.c>
Header set Pragma “public”
Header append Cache-Control “public”
Header set X-Powered-By “W3 Total Cache/0.9.4.1″
</IfModule>
</FilesMatch>
# END W3TC Browser Cache
# BEGIN W3TC Page Cache core
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteRule .* – [E=W3TC_ENC:_gzip]
RewriteCond %{HTTP_COOKIE} w3tc_preview [NC]
RewriteRule .* – [E=W3TC_PREVIEW:_preview]
RewriteCond %{REQUEST_METHOD} !=POST
RewriteCond %{QUERY_STRING} =””
RewriteCond %{REQUEST_URI} \/$
RewriteCond %{HTTP_COOKIE} !(comment_author|wp\-postpass|w3tc_logged_out|wordpress_logged_in|wptouch_switch_toggle) [NC]
RewriteCond “%{DOCUMENT_ROOT}/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}” -f
RewriteRule .* “/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}” [L]
</IfModule>
# END W3TC Page Cache core
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
RewriteCond %{HTTP_HOST} ^topfivebuzz\.mayanz\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.topfivebuzz\.mayanz\.com$
RewriteRule ^/?$ “http\:\/\/www\.topfivebuzz\.com” [R=301,L]
Options -Indexes
====================================================
Hi,
You can move the reviews above or under the content not in the content: http://screencast.com/t/LpO6ZNPJ3
Result above the content(after featured image): http://screencast.com/t/MC4rvZWnR7GX
Thanks!
Hello,
Even after editing loop-single.php, i cannot move the review box in the post.
I’ve cleared my cache, but it still doesn’t move.
Is there anyway to edit the td-post-text-content class to move the review box up in the page?
Thanks!
Hello,
I change my THEME ACCENT COLOR and I save, in preview, the color is the good color but in my site (http://whv-en-australie.com/) is the old color why ? I waited 24 hours…
Thanks
Hi,
You can move the review code in post template file under featured image – http://screencast.com/t/kcfLnLdf0q
Result: http://screencast.com/t/MC4rvZWnR7GX
Thanks!
Can we change the reviews box to below the featured images section in standard post type…
-Tollywoodfans
Hi,
I’ve replied you 8 days ago. Haven’t you received my message?
This was my reply:
Hi,
I’ve checked your site and noticed that you use module 7 for your blog template: http://screencast.com/t/bGV5T8sl This is adding an excerpt paragraph and not the post content. To have this set like on our demo: http://demo.tagdiv.com/newsmag_classic_blog/ you need to use module 1 for you blog post template: http://screencast.com/t/JIqqaCrQI5P – and use the read more tag from post editor to set the length of the content shown in post’s preview/excerpt, like this: http://screencast.com/t/YxPgnkhD – this will display this result: http://screencast.com/t/ARq5qbnW (please note that this ‘read more’ tag only works on loops – categories and blog pages in general).
Thanks
Lucian C.
Thanks
Hi Lucian/Chris,
Just heard back from envato about the Google analytics not being allowed and apparently it’s correct.
They tell me… Theme authors are no longer allowed to create an area within the theme for the google analytics code to be inserted. They didn’t tell me why this change had been made but I have emailed them asking for why and await their reply.
The author of the other theme I bought that did not included an area for the GA code to be inserted told me a guy called Igor at Envato told him about it and it’s enforced by reviewers and to be excluded from Theme Options
Many thanks
Dean
Im trying to save a page on my site. I can click save draft, but when i try to preview it shows a 404 error. Is there something im doing wrong?
I need help with the following issue stated by my hosting agency:
You site code seems to generate a lot of connections per IP, as a result with 1 person visiting and clicking around it uses resources as though a number of people are visiting the site.
Kindly assist.
Also why is it that when I share my posts to facebook it previews a totally random pcture.
And how can I enable mobile ads?
Thanks for your quick reply.
Hi,
We aren’t aware of anything like this, if you have any real/concrete info on this please share it with us.
Please also note that our themes, and any other themes for that matter, have been tested and analyzed by Envato reviewers therefore if something was against their rules any of the themes would not pass their reviews.
Thanks
Hi,
The itemprop="mainContentOfPage" microdata property is not an required property for the articles or reviews markup. The maincontentofpage property is a webpage type property: http://screencast.com/t/0nAUlGzFw9 not for articles or reviews types.
The markup system will be reviewed in version 5 (available towards the end of the month) of the theme all will work fine.
Thanks
For those who care about my thoughts on this; based on 9 years of suffering WordPress oddities, I usually do this to ensure logos actually work
a) upload logo image via FTP to your image folder (uploads or whatever if you changed it; or even to custom images folder if you want)
b) in the admin panel put in the full URL (not server path) to the logo image, then click SAVE, and then preview of logo will appear showing theme can “see” the logo file(s)
c) clear caching
d) if logo still doesn’t show on site, it’s a caching issue — e.g., look at the page source for your page, and LOOK to see what image is actually loading on your page — is it the right one? If not, then likely cached. If not, go back and double check your logo setting “stuck.”
This may not help you, but it’s how I do it for my sites out of paranoia and logos work on all sites perfectly.
Hi,
Remove this itemprop="mainContentOfPage" from single post template 2: http://screencast.com/t/YZ2Etzg0ZXyb then test again. It should fix the markup error: http://screencast.com/t/NNuEv4fG
We will have a look into theme’s review system and fix this issues in the next theme update.
Sorry for the inconvenience!
Let me know how it goes!
Thanks
and….how did you get the menu set full width with multiple columns for links? As seen under the TRAVEL top level menu item on this demo: http://themeforest.net/item/newsmag-news-magazine-newspaper/full_screen_preview/9512331
I’ll be able to stick with the stock theme version of the menu if I can figure out a few of these things I brought up.
Facebook chooses how to show images based on several factors – size of original images, orientation, and the specific image set as featured in the og:image tag.
You have zero control over that, sadly.
Sometimes they capture with the image to side, then later it expands to full width. Only works usually if the image is rectangle, and large enough for their “large” image size.
The preview as in your example above isn’t always the “final” posted version on timeline.
Welcome to Facebook.
Hi, last question on this one.
I see this in each loop:
<?php echo $td_mod_single->get_review();?>
But where is if statement located to check if “Is product review” (and thus execute td_review.php)?
Thanks!
Ah, all for not. I’ve decided to use your core review code as is!
I think I got it! Here’s code I used, hopefully ok 🙂
$buffy .= ‘<div class=”td-review-summary-content”>’;
$venue = get_post_meta( get_the_ID(), ‘review-where’, true);if (!empty($venue)) {$buffy.=”.$venue.”;}
$buffy .= ‘</div>’;
Thanks Lucian! I am so close (I can’t afford to hire freelancer). I added this line and the if works, but won’t output:
if((get_post_meta(get_the_ID(),”review-where”,true))) {$buffy.=’.get_post_meta(get_the_ID(), “review-where”, true).’;}
I know syntax is incorrect on 2nd part. How to I make it execute .get_post_meta command instead of echo?
If I know this I can do rest no problem! So close!
Clint
I am using Newspaper 4.6.3 with one of my website http://www.wpdiv.com and it works well in earlier days. Currently i am experiencing some issues with its permalink, sub title and product review snippets (i am using star ratings)
After i have updated with Yoast SEO plugin into 2.1.1, experiencing peculiar issues. Once i have successfully published the post, incase if i edit the post for some reasons post permalink changes automatically. Also sub title and rich snippets parameters as well.
If i disable the Yoast SEO plugin, everything goes normal. What would be the cause for this issue?
Will you please help me to troubleshoot this issue?