No search results were found in Documentation!
Hi, I have installed the theme, and just have no clue what to do next. I have just converted my wp.com to .org and so all my featured images and media library have gone, but even so I can’t understand why at the top there is just a big black box. Also, it says it is listing my posts by the most recent first, but it isn’t – it’s got all my posts jumbled up.
I want my home page to be the same layout as the demo page. http://themeforest.net/item/newspaper/full_screen_preview/5489609
I don’t want to install the demo because I don’t want all it’s posts. What do I do? Why isn’t it laid out like in the preview?
Please help!! lifeisntjustaholiday.com
Works fine for me – http://www.droidgobl.in/2014/08/09/review-nuggets-icon-pack-by-mindplay-media/
If you’re using Cloudfare, make sure to disable Rocket loader and JS minify.
Okay as I am messing around with designing pages, I notice when I use a block it doesn’t show a preview picture with the post. Is there a button or something I am not hitting?
-
This reply was modified 12 years by
Rodney828.
Ok FYI if interested, I reinstalled again yesterday because of the things Steven told me.
Well Chris- I still use the W3 Cache (page only) and wrote the rest of .htaccess by myself, like u posted in another thread. (little bit proud on myself that it did not crash 😀 )
Is everything ok with that or have any other suggestion?
See my current htaccess here:
# BEGIN W3TC Page Cache core
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTPS} =on
RewriteRule .* - [E=W3TC_SSL:_ssl]
RewriteCond %{SERVER_PORT} =443
RewriteRule .* - [E=W3TC_SSL:_ssl]
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 %{HTTP_COOKIE} !(comment_author|wp\-postpass|w3tc_logged_out|wptouch_switch_toggle) [NC]
RewriteCond "%{DOCUMENT_ROOT}/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_SSL}%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}" -f
RewriteRule .* "/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_SSL}%{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
AddType text/javascript .js
# BEGIN Expire headers
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 5 seconds"
ExpiresByType image/x-icon "access plus 2500000 seconds"
ExpiresByType image/jpeg "access plus 2500000 seconds"
ExpiresByType image/png "access plus 2500000 seconds"
ExpiresByType image/gif "access plus 2500000 seconds"
ExpiresByType application/x-shockwave-flash "access plus 2500000 seconds"
ExpiresByType text/css "access plus 700000 seconds"
ExpiresByType text/javascript "access plus 700000 seconds"
ExpiresByType application/javascript "access plus 700000 seconds"
ExpiresByType application/x-javascript "access plus 700000 seconds"
ExpiresByType text/html "access plus 600 seconds"
ExpiresByType application/xhtml+xml "access plus 600 seconds"
</IfModule>
# END Expire headers
# BEGIN Cache-Control Headers
<IfModule mod_headers.c>
<filesMatch "\.(ico|jpe?g|png|gif|swf)$">
Header set Cache-Control "public"
</filesMatch>
<filesMatch "\.(css)$">
Header set Cache-Control "public"
</filesMatch>
<filesMatch "\.(js)$">
Header set Cache-Control "private"
</filesMatch>
<filesMatch "\.(x?html?|php)$">
Header set Cache-Control "private, must-revalidate"
</filesMatch>
</IfModule>
# END Cache-Control Headers
<IfModule mod_headers.c>
Header unset ETag
</IfModule>
<IfModule mod_alias.c>
RedirectMatch 403 /xmlrpc.php
</IfModule>
# pass the default character set
AddDefaultCharset utf-8
# BEGIN Keep-Alive
<ifModule mod_headers.c>
Header set Connection keep-alive
</ifModule>
# END Keep-Alive
#BEGIN GZIP
<IfModule mod_deflate.c>
<filesMatch "\.(js|css|html|php)$">
SetOutputFilter DEFLATE
</filesMatch>
</IfModule>
#END GZIP
#BEGIN CF ALLOW
Allow from 2400:cb00::/32
Allow from 2606:4700::/32
Allow from 2803:f800::/32
Allow from 2405:b500::/32
Allow from 2405:8100::/32
#END CF ALLOW
As you can see I had to add the keep-alive code and other stuff like gzip- because otherwise GTMetrix would complain about that.
http://gtmetrix.com/reports/cherrykoks.de/4DKTK3Af I guess I can not influence the the both points about cloudflare?
The only thing I’m little bit confused about, is the fact that the mentioned code
foreach ($this->styles_for_footer as $style_id => $style_src) {
echo "<link rel='stylesheet' id='" . $style_id . "-css' href='" . $style_src . "?ver=" . $current_theme_version . "' type='text/css' media='all' />\n";
in the booster plugin causes my strings. Can I change that?
And:
in the Pagespeed guide from tagdiv I read this:
The plugin will move the theme and recommended plugins js and css at the page bottom. If you have other plugins installed you have to modify the Speed Booster plugin file so it will also move those files at end of the page. In the next section you will learn how to accomplish this.
4.2 To get the list of registered css and js add the following code at the end of the functions.php file:
function td_inspect_scripts() {
global $wp_scripts, $wp_styles;
echo ‘registered scripts<br>’;
foreach ($wp_scripts->queue as $handle) {
echo $handle . ‘ | ‘ . $wp_scripts->registered[$handle]->src . ‘<br>’;
}
echo ‘registered styles<br>’;
foreach ($wp_styles->queue as $handle) {
echo $handle . ‘ | ‘ . $wp_styles->registered[$handle]->src . ‘<br>’;
}
}
add_action( ‘wp_print_scripts’, ‘td_inspect_scripts’ );
SpeedBooster plugin ist runnin as you know, do I have to change that as advised?
The sentence with “If you have other plugins installed you have to modify plugin so it will also move those files”
Other plugins means = every plugin I’m using? No problem to add this code to functions.php – just wanna make sure if this is right.
Well the commenting out like here:
http://screencast.com/t/AJFofBi3Ym
did not work for me, when I did this – I got a syntax error.
my googlefonts section in the functions.php looks like this:
//google fonts
if ((defined('TD_DEPLOY_MODE') and (TD_DEPLOY_MODE == 'demo' /*or TD_DEPLOY_MODE == 'dev' */)) or defined('TD_SPEED_BOOSTER')) { //on demo and dev we load only the latin fonts
//modify this collection if you want to optimize the fonts loaded
//collection url -> : http://www.google.com/fonts#ReviewPlace:refine/Collection:PT+Sans:400,700,400italic|Ubuntu:400,400italic|Open+Sans:400italic,400|Oswald:400,700|Roboto+Condensed:400italic,700italic,400,700
wp_enqueue_style('google-font-rest', td_global::$http_or_https . '://fonts.googleapis.com/css?family=PT+Sans:400,700,400italic|Ubuntu:400,400italic|Open+Sans:400italic,400|Oswald:400,700|Roboto+Condensed:400italic,700italic,400,700'); //used on menus/small text
}
else {
$td_user_fonts_list = array();
$td_user_fonts_db = td_util::get_option('td_fonts');
if(!empty($td_user_fonts_db)) {
foreach($td_user_fonts_db as $td_font_setting_key => $td_font_setting_val) {
if(!empty($td_font_setting_val) and !empty($td_font_setting_val['font_family'])) {
$td_user_fonts_list[] = $td_font_setting_val['font_family'];
}
}
}
if(!in_array('g_438', $td_user_fonts_list)) {//'g_438', //Open Sans
wp_enqueue_style('google-font-opensans', td_global::$http_or_https . '://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700&subset=latin,cyrillic-ext,greek-ext,greek,vietnamese,latin-ext,cyrillic'); //used on menus/small text
}
if(!in_array('g_617', $td_user_fonts_list)) {//'g_617', //Ubuntu
wp_enqueue_style('google-font-ubuntu', td_global::$http_or_https . '://fonts.googleapis.com/css?family=Ubuntu:300,400,500,700,300italic,400italic,500italic,700italic&subset=latin,cyrillic-ext,greek-ext,greek,latin-ext,cyrillic'); //used on content
}
if(!in_array('g_453', $td_user_fonts_list)) {//'g_453', //PT Sans
wp_enqueue_style('google-font-pt-sans', td_global::$http_or_https . '://fonts.googleapis.com/css?family=PT+Sans:400,700,400italic&subset=latin,cyrillic-ext,latin-ext,cyrillic'); //used on content
}
if(!in_array('g_445', $td_user_fonts_list)) {//'g_445', //Oswald
wp_enqueue_style('google-font-oswald', td_global::$http_or_https . '://fonts.googleapis.com/css?family=Oswald:400,300,700&subset=latin,latin-ext'); //used on content
}
if(!in_array('g_521', $td_user_fonts_list)) {//'g_521', //Roboto
wp_enqueue_style('google-roboto-cond', td_global::$http_or_https . '://fonts.googleapis.com/css?family=Roboto+Condensed:300italic,400italic,700italic,400,300,700&subset=latin,cyrillic-ext,greek-ext,greek,vietnamese,latin-ext,cyrillic'); //used on content
}
if(!in_array('g_639', $td_user_fonts_list)) {//'g_639', //Vollkorn
wp_enqueue_style('google-vollkorn', td_global::$http_or_https . '://fonts.googleapis.com/css?family=Vollkorn:400italic,700italic,400,700'); //used on quoates classic
}
}
//add the google style link for fonts used by user
$td_fonts_css_files = td_util::get_option('td_fonts_css_files');
if(!empty($td_fonts_css_files)) {
wp_enqueue_style('google-fonts-style', td_global::$http_or_https . $td_fonts_css_files);
}
I placed the Comment out before : //google fonts and after 00,700|Roboto+Condensed:400italic,700italic,400,700′); //used on menus/small text
}
thank Lord I made a backup 😀
Yea…
That’s the answer I got after spending much time adjusting my implementation to the theme… not a high priority at this point for Tagdiv 🙁
Well, the good news for you @mo-tech is that I was pretty stubborn this time and followed up with WPML trying to find all sorts of workarounds for the things that troubled me so I might be able to give you a few tips if I know what you are trying to accomplish.
(With their 199$ version – chances are you can get the Multilanguage aspects – maybe not from the theme panel but using the string translation features).
BTW
In expressing my frustration from the above via the review @ Themeforest, certain members of Tagdiv support seem to have gotten the impression they can “excommunicate” and avoid providing support on my tickets…
Be AWARE | Choose WISELY | Stay TRUE
🙂
Hi there guys,
I’d tried changing the color of the button (of short codes), but that didn’t work anytime.
See it at the bottom of this post http://www.clearawayacne.com/products/acne-no-more-review.

I don’t want it to be colored with the default one. How can I change it?
Hi,
Please add this custom css in Theme Panel > Custom CSS.
This one is for tabs videos:
.single .wpb_tour_tabs_wrapper iframe {
height: 100% !important;
}
And this one is for reviews stars:
.single .post-ratings img {
float: left;
}
You should get this result: http://screencast.com/t/hIicSe8F74V
Thanks
Appreciate the reply Chris!
I do have a good knowledge of wordpress and have used it for many blogs. For a news website im just a little uneducated. I see how your explaining it by putting each post into a category lets say ‘Windows 8.1 Review’ in a category called ‘Tech’.
I just dont like the little customization there is though for a category page. What I would like to have is a featured slider at the top. Then lets say a module of latest news from that category and then maybe a section ‘Other News’ below that. Atm I cant see anyway of doing that unless you make a page and add modules…
Any feedback is welcome!
Um…. you might want to read up on how to use WordPress first from the many tutorials online. Then review the docs for the theme, then explore using the features on each category page.
Typically you have categories for news such as
* Technology
* Entertainment
* Music
* Sports
then when you do a post, the news post gets put into a category related to that news content, like “Sports.”
For each category page, you can select a module layout, such as a big photo, and then colors, and a description about that category. The category page auto-updates with your latest items, and you can make it so the “featured” post is highlighted on each category page.
If you want to create a complete home page like layout for each category, you might have to do some custom programming. This is typically done in WordPress by creating a new category template based on the category number.
That might not be the best answer, but perhaps it will get the juices flowing 🙂
Yeah did that, but no preview on main page (like feat. image) – it was just blank…. white space and under it the title of the article….
Hi
I solved the problem by using @media queries. Thanks for the help 🙂
Also, is it possible to make the Review section make a little bit colorful in the next update? For example, if the review is 8+ the bar will be Green-ish and if its under 8, it would be Yellow and if its under 4, its gonna be Red?
Let me know, please.
Regards,
Mehedi
My .htaccess file on my site…WARNING DON’T USED MINE ARE IT WILL BREAK UR SITE..MINE IS LIKE THIS BECAUSE OF OTHER THINGS THAT I HAVE DONE ON MY SITE for safty…
# BEGIN All In One WP Security
#AIOWPS_BLOCK_WP_FILE_ACCESS_START
<Files license.txt>
order allow,deny
deny from all
</files>
<Files wp-config-sample.php>
order allow,deny
deny from all
</Files>
<Files readme.html>
order allow,deny
deny from all
</Files>
#AIOWPS_BLOCK_WP_FILE_ACCESS_END
#AIOWPS_BASIC_HTACCESS_RULES_START
<Files .htaccess>
order allow,deny
deny from all
</Files>
ServerSignature Off
LimitRequestBody 10240000
<Files wp-config.php>
order allow,deny
deny from all
</Files>
#AIOWPS_BASIC_HTACCESS_RULES_END
#AIOWPS_PINGBACK_HTACCESS_RULES_START
<IfModule mod_alias.c>
RedirectMatch 403 /(.*)/xmlrpc\.php$
</IfModule>
#AIOWPS_PINGBACK_HTACCESS_RULES_END
#AIOWPS_DISABLE_INDEX_VIEWS_START
Options -Indexes
#AIOWPS_DISABLE_INDEX_VIEWS_END
#AIOWPS_DISABLE_TRACE_TRACK_START
RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* – [F]
#AIOWPS_DISABLE_TRACE_TRACK_END
#AIOWPS_FORBID_PROXY_COMMENTS_START
RewriteCond %{REQUEST_METHOD} =POST
RewriteCond %{HTTP:VIA}%{HTTP:FORWARDED}%{HTTP:USERAGENT_VIA}%{HTTP:X_FORWARDED_FOR}%{HTTP:PROXY_CONNECTION} !^$ [OR]
RewriteCond %{HTTP:XPROXY_CONNECTION}%{HTTP:HTTP_PC_REMOTE_ADDR}%{HTTP:HTTP_CLIENT_IP} !^$
RewriteCond %{REQUEST_URI} !^/(wp-login.php|wp-admin/|wp-content/plugins/|wp-includes/).* [NC]
RewriteRule .* – [F,NS,L]
#AIOWPS_FORBID_PROXY_COMMENTS_END
#AIOWPS_FIVE_G_BLACKLIST_START
# 5G BLACKLIST/FIREWALL (2013)
# @ http://perishablepress.com/5g-blacklist-2013/
# 5G:[QUERY STRINGS]
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} (\”|%22).*(<|>|%3) [NC,OR]
RewriteCond %{QUERY_STRING} (javascript:).*(\;) [NC,OR]
RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3) [NC,OR]
RewriteCond %{QUERY_STRING} (\\|\.\./|`|=’$|=%27$) [NC,OR]
RewriteCond %{QUERY_STRING} (\;|’|\”|%22).*(union|select|insert|drop|update|md5|benchmark|or|and|if) [NC,OR]
RewriteCond %{QUERY_STRING} (base64_encode|localhost|mosconfig) [NC,OR]
RewriteCond %{QUERY_STRING} (boot\.ini|echo.*kae|etc/passwd) [NC,OR]
RewriteCond %{QUERY_STRING} (GLOBALS|REQUEST)(=|\[|%) [NC]
RewriteRule .* – [F]
</IfModule>
# 5G:[USER AGENTS]
<IfModule mod_setenvif.c>
# SetEnvIfNoCase User-Agent ^$ keep_out
SetEnvIfNoCase User-Agent (binlar|casper|cmsworldmap|comodo|diavol|dotbot|feedfinder|flicky|ia_archiver|jakarta|kmccrew|nutch|planetwork|purebot|pycurl|skygrid|sucker|turnit|vikspider|zmeu) keep_out
<limit GET POST PUT>
Order Allow,Deny
Allow from all
Deny from env=keep_out
</limit>
</IfModule>
# 5G:[REQUEST STRINGS]
<IfModule mod_alias.c>
RedirectMatch 403 (https?|ftp|php)\://
RedirectMatch 403 /(https?|ima|ucp)/
RedirectMatch 403 /(Permanent|Better)$
RedirectMatch 403 (\=\\\’|\=\\%27|/\\\’/?|\)\.css\()$
RedirectMatch 403 (\,|\)\+|/\,/|\{0\}|\(/\(|\.\.\.|\+\+\+|\||\\\”\\\”)
RedirectMatch 403 \.(cgi|asp|aspx|cfg|dll|exe|jsp|mdb|sql|ini|rar)$
RedirectMatch 403 /(contac|fpw|install|pingserver|register)\.php$
RedirectMatch 403 (base64|crossdomain|localhost|wwwroot|e107\_)
RedirectMatch 403 (eval\(|\_vti\_|\(null\)|echo.*kae|config\.xml)
RedirectMatch 403 \.well\-known/host\-meta
RedirectMatch 403 /function\.array\-rand
RedirectMatch 403 \)\;\$\(this\)\.html\(
RedirectMatch 403 proc/self/environ
RedirectMatch 403 msnbot\.htm\)\.\_
RedirectMatch 403 /ref\.outcontrol
RedirectMatch 403 com\_cropimage
RedirectMatch 403 indonesia\.htm
RedirectMatch 403 \{\$itemURL\}
RedirectMatch 403 function\(\)
RedirectMatch 403 labels\.rdf
RedirectMatch 403 /playing.php
RedirectMatch 403 muieblackcat
</IfModule>
# 5G:[REQUEST METHOD]
<ifModule mod_rewrite.c>
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* – [F]
</IfModule>
#AIOWPS_FIVE_G_BLACKLIST_END
#AIOWPS_PREVENT_IMAGE_HOTLINKS_START
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} \.(gif|jpe?g?|png)$ [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://jahliveradio\.com [NC]
RewriteRule \.(gif|jpe?g?|png)$ – [F,NC,L]
</IfModule>
#AIOWPS_PREVENT_IMAGE_HOTLINKS_END
# END All In One WP Security
# BEGIN NinjaFirewall (WP+)
<IfModule !mod_php5.c>
<IfModule mod_env.c>
SetEnv PHPRC /home/hxnlfcaw/public_html/.user.ini
</IfModule>
</IfModule>
# END NinjaFirewall (WP+)
# BEGIN HTML5 Boilerplate
# This contains the HTML5 Boilerplate .htaccess that can be found at:
# github.com/h5bp/html5-boilerplate/blob/master/.htaccess
#
# Added:
# Block access to access to WordPress files that reveal version information.
#
# Commented out by default:
# Expires headers: Use WP Super Cache or W3 Total Cache (unless using the H5BP build script)
# ETag removal: Use WP Super Cache or W3 Total Cache (unless using the H5BP build script)
# Start rewrite engine: Handled by WordPress
# Suppress/force www: Handled by WordPress
# Custom 404 page: Handled by WordPress
#
# Anytime you update this file the .htaccess file in the root of your
# WordPress install is automatically updated with the changes whenever
# the permalinks are flushed or set
#
# ———————————————————————-
# Better website experience for IE users
# ———————————————————————-
# Force the latest IE version, in various cases when it may fall back to IE7 mode
# github.com/rails/rails/commit/123eb25
# Use ChromeFrame if it’s installed for a better experience for the poor IE folk
<IfModule mod_headers.c>
Header set X-UA-Compatible “IE=edge”
# mod_headers can’t match by content-type, but we don’t want to send this header on *everything*…
<FilesMatch “\.(appcache|crx|css|eot|gif|htc|ico|jpe?g|js|m4a|m4v|manifest|mp4|oex|oga|ogg|ogv|otf|pdf|png|safariextz|svg|svgz|ttf|vcf|webapp|webm|webp|woff|xml|xpi)$”>
Header unset X-UA-Compatible
</FilesMatch>
</IfModule>
# ———————————————————————-
# 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 “\.(eot|font.css|otf|ttc|ttf|woff)$”>
Header set Access-Control-Allow-Origin “*”
</FilesMatch>
</IfModule>
# ———————————————————————-
# Proper MIME type for all files
# ———————————————————————-
<IfModule mod_mime.c>
# JavaScript
# Normalize to standard type (it’s sniffed in IE anyways)
# tools.ietf.org/html/rfc4329
AddType application/javascript js jsonp
AddType application/json json
# Audio
AddType audio/ogg oga ogg
AddType audio/mp4 m4a f4a f4b
# Video
AddType video/ogg ogv
AddType video/mp4 mp4 m4v f4v f4p
AddType video/webm webm
AddType video/x-flv flv
# SVG
# Required for svg webfonts on iPad
# twitter.com/FontSquirrel/status/14855840545
AddType image/svg+xml svg svgz
AddEncoding gzip svgz
# Webfonts
AddType application/vnd.ms-fontobject eot
AddType application/x-font-ttf ttf ttc
AddType font/opentype otf
AddType application/x-font-woff woff
# Assorted types
AddType application/octet-stream safariextz
AddType application/x-chrome-extension crx
AddType application/x-opera-extension oex
AddType application/x-shockwave-flash swf
AddType application/x-web-app-manifest+json webapp
AddType application/x-xpinstall xpi
AddType application/xml atom rdf rss xml
AddType image/webp webp
AddType image/x-icon ico
AddType text/cache-manifest appcache manifest
AddType text/vtt vtt
AddType text/x-component htc
AddType text/x-vcard vcf
</IfModule>
# ———————————————————————-
# Gzip compression
# ———————————————————————-
<IfModule mod_deflate.c>
# Force compression for mangled headers.
# http://developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping
<IfModule mod_setenvif.c>
<IfModule mod_headers.c>
SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
RequestHeader append Accept-Encoding “gzip,deflate” env=HAVE_Accept-Encoding
</IfModule>
</IfModule>
# Compress all output labeled with one of the following MIME-types
# (for Apache versions below 2.3.7, you don’t need to enable mod_filter
# and can remove the <IfModule mod_filter.c> and </IfModule> lines
# as AddOutputFilterByType is still in the core directives).
<IfModule mod_filter.c>
AddOutputFilterByType DEFLATE application/atom+xml \
AddOutputFilterByType DEFLATE application/javascript \
AddOutputFilterByType DEFLATE application/json \
AddOutputFilterByType DEFLATE application/rss+xml \
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject \
AddOutputFilterByType DEFLATE application/x-font-ttf \
AddOutputFilterByType DEFLATE application/x-web-app-manifest+json \
AddOutputFilterByType DEFLATE application/xhtml+xml \
AddOutputFilterByType DEFLATE application/xml \
AddOutputFilterByType DEFLATE font/opentype \
AddOutputFilterByType DEFLATE image/svg+xml \
AddOutputFilterByType DEFLATE image/x-icon \
AddOutputFilterByType DEFLATE text/css \
AddOutputFilterByType DEFLATE text/html \
AddOutputFilterByType DEFLATE text/plain \
AddOutputFilterByType DEFLATE text/x-component \
AddOutputFilterByType DEFLATE text/xml
</IfModule>
</IfModule>
# ———————————————————————-
# UTF-8 encoding
# ———————————————————————-
# Use UTF-8 encoding for anything served text/plain or text/html
AddDefaultCharset utf-8
# Force UTF-8 for a number of file formats
<IfModule mod_mime.c>
AddCharset utf-8 .atom .css .js .json .rss .vtt .webapp .xml
</IfModule>
# ———————————————————————-
# A little more security
# ———————————————————————-
# “-Indexes” will have Apache block users from browsing folders without a default document
# Usually you should leave this activated, because you shouldn’t allow everybody to surf through
# every folder on your server (which includes rather private places like CMS system folders).
<IfModule mod_autoindex.c>
Options -Indexes
</IfModule>
# Block access to backup and source files
# This files may be left by some text/html editors and
# pose a great security danger, when someone can access them
<FilesMatch “(\.(bak|config|sql|fla|psd|ini|log|sh|inc|swp|dist)|~)$”>
Order allow,deny
Deny from all
Satisfy All
</FilesMatch>
# Block access to WordPress files that reveal version information.
<FilesMatch “^(wp-config\.php|readme\.html|license\.txt)”>
Order allow,deny
Deny from all
Satisfy All
</FilesMatch>
# END HTML5 Boilerplate
# 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
# Leverage Browser Caching Ninja — Starts here
# Do not write anything between “Leverage Browser Caching Ninja — Starts” and “Leverage Browser Caching Ninja — Ends”
# It will be deleted while uninstalling Leverage Browser Caching Ninja plugin
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault “access plus 1 month”
ExpiresByType image/x-icon “access plus 1 year”
ExpiresByType image/gif “access plus 1 month”
ExpiresByType image/png “access plus 1 month”
ExpiresByType image/jpg “access plus 1 month”
ExpiresByType image/jpeg “access plus 1 month”
ExpiresByType text/css “access 1 month”
ExpiresByType application/javascript “access plus 1 year”
</IfModule>
# Leverage Browser Caching Ninja — Ends here
Hi Emil!
It’s already on virtual hosting and you can test it. In Don’t miss on the main page you can find these posts with preview.
http://themostthings.ru/samorazvitie/kak-izbavitsya-ot-hlama-i-stat-schastlivoy.html
http://themostthings.ru/v-mire/14-faktov-o-budapeshte.html
http://themostthings.ru/samorazvitie/13-poleznyih-privyichek-dlya-zhizni.html
Thank you
Thank you Lucian.
I found get_image function in file: includes\modules\module_modifier\td_module_blog.php and I edit it.
I’m change line (in this function):
return ''; //the post has no thumb
To
echo '<img src="' . get_first_image() . '" alt="' . the_title(). '" />';
And add this function:
function get_first_image() {
global $post, $posts;
$first_img = '';
ob_start();
ob_end_clean();
$output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
$first_img = '';
if (isset($matches[1][0])) {$first_img = $matches[1][0];}
return $first_img;
}
Results:
/**
* get_image v010 - modified on wp_010 - returns the featured image of a single post
* @param $thumbType
* @return string
*/
function get_image($thumbType) {
global $page;
//show only on the first page when we have posts with pages
if (!empty($page) and $page > 1) {
return;
}
//do not show the featured image if the global setting is set to hide - show the video preview regardless of the setting
if (td_util::get_option('tds_show_featured_image') == 'hide' and get_post_format($this->post->ID) != 'video') {
return;
}
//do not show the featured image on gallery post format
if (get_post_format($this->post->ID) == 'gallery') {
return;
}
//handle video post format
if (get_post_format($this->post->ID) == 'video') {
//if it's a video post...
$td_post_video = get_post_meta($this->post->ID, 'td_post_video', true);
$td_video_support = new td_video_support();
//render the video if the post has a video in the featured video section of the post
if (!empty($td_post_video['td_video'])) {
return $td_video_support->renderVideo($td_post_video['td_video']);
}
} else {
//if it's a normal post, show the default thumb
if ($this->post_has_thumb) {
//get the featured image id + full info about the 640px wide one
$featured_image_id = get_post_thumbnail_id($this->post->ID);
$featured_image_info = td_util::attachment_get_full_info($featured_image_id, $thumbType);
//get the full size for the popup
$featured_image_full_size_src = td_util::attachment_get_src($featured_image_id, 'full');
$buffy = '';
$show_td_modal_image = td_util::get_option('tds_featured_image_view_setting') ; //@todo read this setting from theme panel
if ($show_td_modal_image != 'no_modal') {
//wrap the image_html with a link + add td-modal-image class
$image_html = '<a href="' . $featured_image_full_size_src['src'] . '" data-caption="' . htmlentities($featured_image_info['caption'], ENT_QUOTES) . '">';
$image_html .= '<img width="' . $featured_image_info['width'] . '" height="' . $featured_image_info['height'] . '" itemprop="image" class="entry-thumb td-modal-image" src="' . $featured_image_info['src'] . '" alt="' . $featured_image_info['alt'] . '" title="' . $featured_image_info['title'] . '"/>';
$image_html .= '</a>';
} else { //no_modal
$image_html = '<img width="' . $featured_image_info['width'] . '" height="' . $featured_image_info['height'] . '" itemprop="image" class="entry-thumb" src="' . $featured_image_info['src'] . '" alt="' . $featured_image_info['alt'] . '" title="' . $featured_image_info['title'] . '"/>';
}
$buffy .= '<div class="td-post-featured-image">';
// caption - put html5 wrapper on when we have a caption
if (!empty($featured_image_info['caption'])) {
$buffy .= '<figure>';
$buffy .= $image_html;
$buffy .= '<figcaption class="wp-caption-text">' . $featured_image_info['caption'] . '</figcaption>';
$buffy .= '</figure>';
} else {
$buffy .= $image_html;
}
$buffy .= '</div>';
return $buffy;
} else {
echo '<img src="' . get_first_image() . '" alt="' . the_title(). '" />';
}
function get_first_image() {
global $post, $posts;
$first_img = '';
ob_start();
ob_end_clean();
$output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
$first_img = '';
if (isset($matches[1][0])) {$first_img = $matches[1][0];}
return $first_img;
}
}
}
But it not work. Can you help me fix it!
I want to get first image on post and set it as featured image.
Thank you!
-
This reply was modified 12 years by
HanSho.
Hi,
I’m not sure how you added the resource there, looks like it’s part of the content, but you can do it easily like this http://screencast.com/t/uPowZZhZOo
This way will not appear in the post preview http://screencast.com/t/9IFuqSOUt
Hope this helps.
Thanks
Hi!
I fill a caption field for photo with link.
I put a link to resource of the photo.
But this link is showed on preview of my post, how can i get rid of it in preview?
http://webfile.ru/2c209199594cce4e0c6c772184a87c42
You can manually edit the menu items to change them, so if you have “new book reviews” you can change that to “book reviews” … or remove items, or make subcategories…
e.g.,
reviews
> book reviews
> music reviews
> movie reviews
etc.
You can manually adjust what in your menu to make as few or as many items as you want, change names, shorten things, or put them in sub-category drop downs.
Ok, got it, thank you
hi,
the shortcodes that creates the first page when the demo is imported is the same like that on the : http://demo.tagdiv.com/newspaper/ (http://screencast.com/t/rCGL8oKi).
the content is different because of the size of the images. because we can not create a big archive to put on themeforest (for download) we are limited to the number and the sizes of the content we provide in the demo.
to get the xml with the http://demo.tagdiv.com/newspaper/ content please contact us on email at: contact@tagdiv.com with the subject :Requesting demo.tagdiv.com/newspaper/ content.
Thanks for you message.
Radu A.
hi,
maybe its a problem with our code, we will take a look, thanks for reporting this issue.
you can go back to the previews version until we fix the issue
Thanks for you message.
Radu A.
-
This reply was modified 12 years by
Radu A.
Hi,
I believe you are referring to the Recent Comments widget, unfortunately there is no option to display a preview of the comment, as this is an WordPress widget you can do a search for a way of customizing Recent Comments Widget or you can use a plugin that allows you to customize your comments as you wish.
Thanks
Thanks MIXVICE for the advice….it worked.
Using sFTP access, I first saved the PLUGINS folder as “disabled_plugins”
Then deleted the PLUGINS folder
Was then able to access the WP admin manager
Changed the name of “disabled_plugins” back to PLUGINS
All the required plugins reloaded and everything worked well.
I also no realize that I didn’t have a list of other plugins we had previously installed and so am having to review and reactivate the non-required plugins that were lost.
thanks for your help!
Hi,
My webmaster wants to use the common elements you use on the preview template of the site for settings/formating/ect ect and wanted me to ask if you can provide the template or such for them? Maybe I am not explaining it correctly but basically we want what you have on that “Preview Page” that is you use for advertisement of “Newspaper” theme. The site formating I guess is really good but you do not provide that in the “Demo Install” which is different from what you have in the preview. He said he could do it from scratch but if I can ask in order to have you guys help him save TIME! LoL, thanks for your help and we both AGREE you have the best THEMES on Themeforest!
Sincerely, Carol