- NewspaperHeader Builder
- NewsmagHeader styles
- NewsmagHeader ads
- NewspaperHeader ads
- NewspaperHeader styles
- Apitd_api_header_style::delete
- Apitd_api_header_style::update_key
- Apitd_api_header_style::update
- Apitd_api_header_style::add
- ApiAPI – Header style – Introduction
- NewspaperSearch setup for custom post type
- NewspapertagDiv Composer – Website Manager
- NewspaperBookmark – Save For Later
- NewspaperWooCommerce: Happy “Add to Favorites!”
- NewspaperModal Popup
- NewspaperFlex Block Settings Guide
- NewspaperPosts Loop Element
- NewspaperHow to Add a Logo in Newspaper
- NewspaperDefault Category Settings
- NewspaperWhen tagDiv Composer is Not Working
Hi Christopher,
As you can see the div of the sidebar has just two classes span4 column_container and it’s a bit harder to target just the sidebar via css and change it’s background color as long as a div just like that is used in the footer also and changing the sidebar will get you changing the footer also, here is an example: http://screencast.com/t/rPW4QDKyh
You can do it tough by adding a specific class on each template you want to change the sidebar color then use that class to target the sidebar and change it’s color via custom css. Here is an example for the category page template: http://screencast.com/t/bTwprqfBwJ and the result: http://screencast.com/t/MNts8tpk
using this css:
.custom-sidebar-background {
background-color: lightgray;
}
You can add this class for all templates and use it to change the sidebar’s background color.
Another thing that you should take into consideration is that the sidebar doesn’t have any padding so you would want to add some padding to it using the same class, but keep in mind that the some blocks may react not in an expected way to this padding because of the width.
Also, as you probably noticed, the post page sidebar has a class which you can use .td-post-sidebar
Regarding the option on panel for this we will leave this at everyone’s hand and use this method to achieve this. This option will be available though within our new theme which we are working on.
Hope this helps!
Thanks
-
This reply was modified 11 years by
Lucian.
Hi,
Please go to header.php file and comment or remove this code: http://screencast.com/t/zY0Og3PTcK
Thanks
Thanks Lucian. Brilliant job on the Newspaper theme – Excellent.
(Errata: Of course, it wasn’t header.php, it was the parts/header-xxxxxx.php files that I modified in the child theme) – The site is still being built but I’ll remove the maintenance splash page so you can see the mods in action – http://www.catalystmag.co.za
Please see the sticky topic top of the forum on optimizing your site for Google PageSpeed. Try using the GTMetrix site to test your speed, as GTMetrix will give you specific info on WHAT needs to be fixed at server level, image compression, slow loading, etc. in more detail.
For example for your server you need to
1) consider faster server account
2) turn on gzip/deflate on server (ask hosting provider)
3) set expiration headers, which can be done from htaccess file on Apache based servers
4) optimize your images, using something like smushit, and/or set compression level with your functions.php file and then regenerate all thumbs; make sure your images you upload are compressed as small as possible from photoshop or whatever you’re using (e.g., quality of 30 if you can, 52 for anything with reds; or try “medium” jpeg quality when save for web).
Those items above are good for about 30 points, and have nothing to do with the theme, but are necessary for ANY WordPress site.
-
This reply was modified 11 years by
simchris.
Thanks, Lucian
what class should I change if I want to keep my “theme color” but change the backing color for the sidebar widgets (e.g., #333399 for main theme color, but #333333 for the sidebar elements)? This would be great option to add to the theme panel, as often folks want a brighter theme color, but something toned down for the sidebar.
Hi Lucian,
Okay, regarding the Header Ad, I get it now…I added the code per your example and it looks pretty good when the window is re-sized. It looks like I now need to figure out a way to shrink the tab sidebar.
I added the custom css for the Revolution slider but it is still in the forefront and overlaps the drop-down from the Header Menu. Any other suggestions?
thanks,
Bill
Hi Christopher,
Thanks for sharing, glad you figured it out!
May I add that you could also modify the top and bottom padding to achieve this, also the line-height for the block titles could also be modified from theme panel then you could use the custom css to adjust the block title container if the theme panel setting doesn’t do it.
.td_block_wrap .block-title a, .td_block_wrap .block-title span, .td_block_wrap .block-title label {
padding: 5px 10px 5px 10px;
line-height: 24px;
}
Thanks
Hi,
@byron_shady/ @TheMediumUTM
It’s enough just to set the rev slider’s z-index to 0, will do the job:
.td_revolution_slider {
z-index: 0;
}
@byron_shady
If you are referring to this: http://screencast.com/t/5PvSRIJleo just use this custom css in theme panel > custom css:
.header-search-wrap .dropdown-menu .btn {
border: 2px solid black;
}
If this is not it please let me know or follow @TheMediumUTM instructions and find the right class for that button.
Hope this helps!
Thanks @TheMediumUTM for your help!
Hello.
I want to use in the shot-codes for buttons
[vc_button title="Button" target="_self" color="default" size="size_large2" href="#"]
event call google-analyics
onClick=”_gaq.push([‘_trackEvent’, ‘Click’, ‘on button’, ‘header ExpertMum’]);”
but this design does not work because of the characters []
in certain functions _gaq.push
How can I be in this case?
Hello,
some themes support custom shortcodes on category pages (top and below) or a category header-picture (e.g. post stlye 3 could look great here), this may be easier to implement. In my case, I’m going to replace category pages by custom pages but it’s really complicated, yes.
-
This reply was modified 11 years by
davistar.
My appologies. That header image issue was solved using Single Image like you advised. Also removed th broken css. Things seem to be working fine now! Thanks!
I’ve implemented the header ad per your documentation, but the problem still persists.
Also, is there a setting to prevent the Revolution slider from blocking the drop down header menu (see “Solutions” option).
Thank you.
Okay.. this one was confusing me, and I’m going to blame lack of sleep this week. Using theme panel I changed the font size for the sidebar headers (e.g., Categories) as I wanted them a little smaller (14px) and ALL CAPS. No problem. However, once the size is changed, the underline creates a space between the box background and the line rule (border).
Was trying to sort out which element to over-ride but how to over-ride with custom CSS to remove the white space. Changing the line-height has no effect (and speed booster is off).
Since some items have an h4 class, like <h4 class="block-title"><span>The Guru</span></h4> and some have simply <div class="block-title"> kinda confusing.
default seems to be
.block-title {
position: relative;
font-family:Montserrat,Helvetica,Arial,sans-serif;
border-bottom: 2px solid #4db2ec;
font-size: 20px;
margin: 0px 0px 26px 0px;
line-height: 32px;
font-weight: normal;
}
changing the margin only changed the spacing after the section, not within the section. So, it looks like the theme panel line height doesn’t over-ride the style sheet?
( I changed default font in style.css, obviously )
So, changing the line height to line-height: 28px; from the custom CSS panel over-rode the spacing so the lines would touch.
This originally started as question while I was figuring it out; decided to post in case anybody else was having an issue on this one 🙂
Easy way is custom CSS:
#td-top-search {
display: none !important;
}
(Less easy but technically better way is to edit menu-header.php and menu-header-center.php in a child theme and remove the content of the div whose ID I just quoted.)
I have a solution that is fairly elegant. For now I’ve used a tag for the issue, e.g. “Issue 25”, and that seems to work. For the Block VC Elements you can set both the tag (e.g. issue-25) and the category id (e.g. 15), which will target the correct posts. I’ve also added an “Issue Number:” metabox to the publish section on the post/page editor, and have a modified header.php to use it to show the issue number in the Masthead, and also the month and year from the publish-date field.
@laehaem
please see the sticky topic at top of the forum, which has a wealth of info about optimizing your server, content, images, and whatnot to achieve best speed.
If your speed is that low it’s likely you have not addressed couple of the most important things for ALL WordPress sites:
1) expiration headers; which can be added via htaccess on Apache servers
2) gzip/deflate running on your server, which auto-compresses all content fed to the web browsers
Those two items are good for about 20 points alone; and is the most common problem with a speed of 65.
If you use GTMetrix to test a post page on your site, make note of the “server” items in the report, as those will be your main culprit.
Hey
I was just wondering why you render a small square ad underneath a video and not a mobile leaderboard as in the header ad. I think the mrec/square takes away a lot of space and doesn’t integrate well!
Is it possible to change the above content ad to a mobile leader board like the header ad is rendered?
thx, Manuel
Hey guys! I have the following problem: Every now and then i cant reach my site for a few hours (www.teilado.de) so this time i decidet to contacted my webhost to ask if they are having server problems which they denied. However they told me that they have found some errors in the error_log of the server and they said it must be theme related. This is what they sent me:
10416:[Mon Aug 25 08:05:55 2014] [warn] [client 66.249.78.174] mod_fcgid: stderr: PHP Fatal error: Call to undefined function get_header() in /var/www/virtual/viralvid/html/wp-content/themes/Newspaperpatch/index.php on line 6
13513:[Mon Aug 25 09:21:12 2014] [warn] [client 66.249.78.167] mod_fcgid: stderr: PHP Fatal error: Call to undefined function get_header() in /var/www/virtual/viralvid/html/wp-content/themes/Newspaperpatch/index.php on line 6
32495:[Mon Aug 25 15:47:47 2014] [warn] [client 66.249.78.160] mod_fcgid: stderr: PHP Fatal error: Call to undefined function get_header() in /var/www/virtual/viralvid/html/wp-content/themes/Newspaperpatch/index.php on line 6
Do you guys know what this error_log means?? Would greatly appreciate your help!
Thx for your time 🙂
You might have a wait. Not everybody who is on the forum has time to fix your server for you. Your first chore would be to read through all the posts in the PageSpeed topic where many folks, including myself, have provided a wealth of FREE advice on how to optimize your server, pagespeed, caching, htaccess and set your server settings properly for gzip/deflate, time to live headers, etc.
The “tagdiv speed booster” plugin is only designed to help with issues of loading js and css files in the most efficient manner for the theme; it doesn’t do anything for your server side caching, account speed on the net (response time), gzip/deflate, expiration headers, or image compression. Put another way it’s not a “config file” for your server, it’s preset to speed up the theme, rather seamlessly in most cases. While you can add to it, if you need to have an additional plugin or something “optimized” for loading when theme pages load, it will NOT fix issues on your server or the content you upload.
Advice would be to first optimize your site content such as using GTMetrix to check your site for server side elements which need to be addressed FIRST, then move on to elements which can be addressed via htaccess, optimize images, and the like. Do all your checks with mod_pagespeed off as this caches elements while you’re working on things. Set the tagdiv speed booster last (only edit it if you understand what you’re doing); then when you have a decent setup, then switch on mod_pagespeed.
However, as noted in the PageSpeed topic, gzip/deflate, expires headers, and the like are good for 20 points all alone. Most common issue if your score is below 80 desktop.
Also, remember this forum provides theme support from the developer, not server management support. You need to learn to manage your server and hosting setup, and this is necessary regardless of what theme you run. So, unless you address those issues first, then the elements to fix in WordPress will not be very effective.
I’m sure Marius will be happy to help with questions on the td_speedbooster plugin included with the theme, but you really should read through the PageSpeed topic since I’ve provided a wealth of advice, and how-to elements there which are critical to optimizing your site — including my own mod_pagespeed settings!
-
This reply was modified 11 years by
simchris.
Hi,
Please make sure that you are using other header style than 3 or 6 with those styles the logo dose not changes.
Thanks
Hi,
Please make sure you have set the header ad like this from theme panel: http://screencast.com/t/Ruod2gmNl
Also, please make sure you add the ads into this div tags like explained in the demo:
* http://screencast.com/t/Ruod2gmNl
* https://forum.tagdiv.com/ads/
Of you don’t want that the ad to be shown on mobile make sure you add it for tablets and desktop and enable it to show on tables and desktop only from theme panel and leave it not top be displayed on mobile.
Hope this helps!
Thanks
I tried many times to clear render blocking css and JS but not successful. I hope someone here will help me out.
Here is my speedbooster.php file
<?php
/*
Plugin Name: tagDiv speed booster
Plugin URI: http://tagdiv.com
Description: Speed booster for Newspaper theme - It moves the styles and all the scripts of the theme to the bottom. It also activates internal theme optimizations for better speed.
Author: tagDiv
Version: 2.5
Author URI: http://tagdiv.com
*/
/*
* 2.6 - fixed rendering bug on the loading of the page
* 2.5 - code improvements, newspaper 4 compatibility
* - makes most of the javascript files use defer parsing
* - better compatibility with revolution slider
* 2.4 - updated jquery version
* - support for https
* 2.3 - fixed warnings when trying to move javascript files that are not registered
*/
class td_speed_booster {
var $load_contact_form_7 = '';
var $load_google_fonts = '';
var $styles_for_footer = array();
var $async_js_scripts = array(
'contact-form-7',
'bbpress',
'woocommerce',
'site',
'devicepx',
'js_composer_front'
);
function __construct() {
add_action('wp_enqueue_scripts', array($this, 'enqueue_scripts_hook'), 100);
add_action('wp_footer', array($this, 'wp_footer_hook'), 15);
add_action('wp_head', array($this, 'wp_head_hook'), 15);
define('TD_SPEED_BOOSTER' , 'v2.5');
}
function enqueue_scripts_hook() {
global $wp_scripts;
//$this->move_js_to_footer('bp-legacy-js');
//detect revmin - revolution slider and do not move jquery
if( !is_admin() and !isset($wp_scripts->registered['revmin'])){
if (is_ssl()) {
$td_protocol = 'https';
} else {
$td_protocol = 'http';
}
wp_deregister_script('jquery');
wp_register_script('jquery', ($td_protocol . '://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js'), true, '1.11.0', true);
wp_enqueue_script('jquery');
}
//move styles
$this->move_style_to_footer('bbp-default-bbpress'); //bpress old
$this->move_style_to_footer('bbp-default'); //bpress
$this->move_style_to_footer('contact-form-7');
$this->move_style_to_footer('td-bootstrap');
$this->move_style_to_footer('td-theme');
$this->move_style_to_footer('google-font-rest');
$this->move_style_to_footer('woocommerce_frontend_styles');
//jetpack lost styles
$this->move_style_to_footer('jetpack-subscriptions');
$this->move_style_to_footer('jetpack-widgets');
$this->move_js_to_footer('themepunchtools');
$this->move_js_to_footer('revmin');
//bbpress
//remove_action( 'bbp_head', array($BBP_Default, 'head_scripts') );
}
function wp_footer_hook() {
$current_theme_version = '';
if (defined('TD_THEME_VERSION')) {
//get the theme version for style
$current_theme_version = TD_THEME_VERSION;
//on demo mode, autogenerate version hourly + day
if (TD_DEPLOY_MODE == 'demo') {
$current_theme_version = date('jG');
}
}
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";
}
}
function wp_head_hook() {
if (defined('TD_THEME_VERSION')) {
echo '<style>body {visibility:hidden;}</style>';
}
}
function move_style_to_footer($style_id) {
global $wp_styles;
if (!empty($wp_styles->registered[$style_id]) and !empty($wp_styles->registered[$style_id]->src)) {
$this->styles_for_footer[$style_id] = $wp_styles->registered[$style_id]->src;
wp_deregister_style($style_id);
}
}
function move_js_to_footer($js_id) {
global $wp_scripts;
if (isset($wp_scripts->registered[$js_id])) {
wp_enqueue_script($js_id, ($wp_scripts->registered[$js_id]->src), '', $wp_scripts->registered[$js_id]->ver, true);
}
}
function async_js_hook($url) {
//check to see if we have js
if (strpos( $url, '.js' ) === false) {
return $url;
}
if ($this->strpos_array($url, $this->async_js_scripts) === false) {
return $url;
} else {
return "$url' defer='defer";
}
}
private function strpos_array($haystack_string, $needle_array, $offset=0) {
foreach($needle_array as $query) {
if(strpos($haystack_string, $query, $offset) !== false) {
return true; // stop on first true result
}
}
return false;
}
}
new td_speed_booster();
And here is my function generated file
registered scripts
common | /wp-admin/js/common.min.js
admin-bar | /wp-includes/js/admin-bar.min.js
utils | /wp-includes/js/utils.min.js
svg-painter | /wp-admin/js/svg-painter.js
wp-auth-check | /wp-includes/js/wp-auth-check.min.js
itsec_file_change_warning_js | http://mydomain.com/wp-content/plugins/better-wp-security/modules/free/file-change/js/admin-file-change-warning.js
itsec_strong_passwords | http://mydomain.com/wp-content/plugins/better-wp-security/modules/free/strong-passwords/js/strong-passwords.js
devicepx | http://s0.wp.com/wp-content/js/devicepx-jetpack.js
wpuf-subscriptions | http://mydomain.com/wp-content/plugins/wp-user-frontend-pro/assets/js/subscriptions.js
wp-color-picker | /wp-admin/js/color-picker.min.js
jquery |
media-upload | /wp-admin/js/media-upload.min.js
thickbox | /wp-includes/js/thickbox/thickbox.js
wpuf-chosen | http://mydomain.com/wp-content/plugins/wp-user-frontend-pro/admin/../assets/js/chosen.jquery.js
wpseo-admin-global-script | http://mydomain.com/wp-content/plugins/wordpress-seo/js/wp-seo-admin-global.min.js
td-wp-admin-general | http://mydomain.com/wp-content/themes/Newspaper/wp-admin/js/general.js
td-wp-admin-panel-js | http://mydomain.com/wp-content/themes/Newspaper/wp-admin/js/wp-admin-panel.js
suggest | /wp-includes/js/jquery/suggest.min.js
registered styles
admin-bar | /wp-includes/css/admin-bar.min.css
colors | 1
ie | /wp-admin/css/ie.min.css
wp-auth-check | /wp-includes/css/wp-auth-check.min.css
itsec_notice_css | http://mydomain.com/wp-content/plugins/better-wp-security/core/css/itsec_notice.css
wp-color-picker | /wp-admin/css/color-picker.min.css
wpuf-chosen-style | http://mydomain.com/wp-content/plugins/wp-user-frontend-pro/admin/../assets/css/chosen/chosen.css
google-font-ubuntu | http://fonts.googleapis.com/css?family=Ubuntu:300,400,500,700,300italic,400italic,500italic,700italic&subset=latin,cyrillic-ext,greek-ext,greek,latin-ext,cyrillic
td-wp-admin-td-panel-2 | http://mydomain.com/wp-content/themes/Newspaper/wp-admin/css/wp-admin.css
thickbox | /wp-includes/js/thickbox/thickbox.css
wpalchemy-metabox | http://mydomain.com/wp-content/themes/Newspaper/wp-admin/content-metaboxes/meta.css
ithemes-icon-font | http://mydomain.com/wp-content/plugins/better-wp-security/lib/icon-fonts/icon-fonts.css
bbp-admin-css | http://mydomain.com/wp-content/plugins/bbpress/includes/admin/css/admin.css
jetpack-icons | http://mydomain.com/wp-content/plugins/jetpack/_inc/jetpack-icons.min.css
Here what my pagespeed test suggest
Remove Render Blocking Javascript
http://mydomain.com/wp-includes/js/jquery/jquery.js.pagespeed.jm.ocognCjcS2.js
http://mydomain.com/wp-includes/js/jquery/jquery-migrate.min.js.pagespeed.jm.mhpNjdU8Wl.js
http://maps.google.com/maps/api/js?sensor=true
http://maps.gstatic.com/maps-api-v3/api/js/17/15/main.js
http://mydomain.com/wp-content/plugins/wp-user-frontend-pro/assets/js/frontend-form.js.pagespeed.jm.DduuMTRcHs.js
Optimize CSS Deliver of the following
http://mydomain.com/wp-content/plugins/revslider/rs-plugin/css/W.settings.css,qrev=4.3.8.pagespeed.cf.DyIPD1r_80.css
http://mydomain.com/wp-content/plugins/revslider/rs-plugin/css/W.captions.php,qrev=4.3.8.pagespeed.cf.VUw1T7K7S2.css
http://mydomain.com/wp-content/plugins/wp-user-frontend-pro/assets/css/W.frontend-forms.css.pagespeed.cf.vemqQTxrMU.css
http://fonts.googleapis.com/css?family=Roboto%3A400%2C700
I am also using Dreampress which is on varnish cache. I enabled Page Speed Mod as well. No other caching plugin.
My Page Speed Score is 64 for desktop and 41 for mobile.
Further, Here is what i added in my httaccess
<IfModule pagespeed_module>
ModPagespeed on
ModPagespeedModifyCachingHeaders off
</IfModule>
# BEGIN Expire headers
<ifModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 5 seconds"
ExpiresByType image/x-icon "access plus 604800 seconds"
ExpiresByType image/jpeg "access plus 604800 seconds"
ExpiresByType image/png "access plus 604800 seconds"
ExpiresByType image/gif "access plus 604800 seconds"
ExpiresByType application/x-shockwave-flash "access plus 604800 seconds"
ExpiresByType text/css "access plus 604800 seconds"
ExpiresByType text/javascript "access plus 604800 seconds"
ExpiresByType application/javascript "access plus 604800 seconds"
ExpiresByType application/x-javascript "access plus 604800 seconds"
#ExpiresByType text/html "access plus 600 seconds"
#ExpiresByType application/xhtml+xml "access plus 600 seconds"
</ifModule>
# END Expire headers
Now please suggest me what to do for increasing my page speed. My site is damn slow. Please help me to correct the speedbooster.php file as per instructions. Special request ot Christopher for helping me out. Thanks
Hi,
I’m not sure what are you trying to achieve. You can have the featured image stretched to full screen width by setting the posts style 4 and making sure you don’t use any backgrounds to your site because in that case your site layout will become boxed and the full width image won’t work. You have to make sure you have an full-width layout, in that case you will have the post page when using style 4 looking like this: http://screencast.com/t/mugp3VZo
Make sure you remove the background image and color from theme panel like this: http://screencast.com/t/Vc8Zd1gzAbS
Also this feature image will be available only on post pages when using post style 4, if you want to use something like this on pages try this method: https://forum.tagdiv.com/topic/full-width-image-header-on-hompage/
Regarding the slider/bigslider full width, you can try to have this via css but the sliders had not been designed to work like that and I don’t know how will respond, you can give it a try or hire a freelancer to do it for you if you don’t know how.
Hope this helps!
Thnaks
Hello,
I’m been having a problem with the metadata for facebook.
When I create a video post, I´m having a conflict with the facebook plugin:
Warning: Wrong parameter count for array_unique() in /plugins/facebook/open-graph-protocol.php on line 785
I´d been researching a while and then realize that in a video type post, the metadata appears in the body, in regular post, it appear in the header, where it´s supposed to be, and therefore there is no problem there.
Any suggestion how can I move the metadata to the header in video post?
Thanks!
Steal the position: absolute; from entry-comments-views and give it to your custom class:
header .entry-comments-views {
position: static !important;
}
.my_avatar_box {
position: absolute;
top: auto;
bottom: 0px;
right: 0px;
}
Now that’s the one that’s pushed up against the right side and has the text flow naturally inside it. So echo that around both the new statements and the call to get_commentsAndViews:
<?php echo '<div class="my_avatar_box">';?>
<?php echo get_avatar($post->post_author, '16');?>
<?php echo $td_mod_single->get_author();?>
<?php echo $td_mod_single->get_commentsAndViews();?>
<?php echo '</div>';?>
Note that for a cleaner author output, you could do this for the third line instead:
<?php echo '<a itemprop="author" href="' . get_author_posts_url($post->post_author) . '">' . get_the_author_meta('display_name', $post->post_author) . '</a>';?>
Which I just grabbed from the function get_author in the theme files, and dropped the “by” and the dash on either side.
You have to promise me that you’re learning from this experience :p