- NewspaperWP Rocket and Newspaper Theme: Optimization Guide
- TutorialsFrom WPBakery to tagDiv Composer
- TutorialsDefault Block Settings Guide
- TutorialsHow to use custom fonts
Splendid, that worked!
Now, one last question for you, @andrei_luca, regarding the darn navbar…
I’m noticing now that there’s a lot of extra space at the bottom of the mega menu than there used to be before I added all of this code. Initially I assumed it was because those elements that you helped me fix were vertically stretched out, but now that they’re the way they should be again, the mega menu still seems to be vertically stretched out. Do you know how I can get it back down to the size it should be?
Here‘s a link to my site again if you want to look and see what I’m talking about.
The following is all the code that’s currently in “Custom CSS” in the Theme Panel:
.sf-menu > .current-menu-item > a:hover, .sf-menu > .sfHover > a:hover, .sf-menu > .td-menu-item > a:hover {
border-bottom: 4px solid #0b9bc6!important;
}
li.menu-item a {
height: 50px;
}
.td_mega_menu_sub_cats .block-mega-child-cats a, .td_block_mega_menu .td-post-category{
height: inherit;
}
Hi there.
I just noticed that when I use a square featured image (e.g. 1067×1067) my current template will show the entire image taking up pretty much the entire screen of a regular 1920×1080 visitor.
Example: http://i.imgur.com/fuEk9YJ.jpg
As a temporary fix I added the following CSS code
.td-post-featured-image {
max-height: 610px;
}
The downside of this fix is that it cuts the bottom part of the image. Is there a way I can re-center it so it cuts top and bottom equally?
I love the “edit” button on post thumbnails visible only to admins when they hover… it saves so much time. I was thinking recently of adapting that for user avatars as well. Where should I look for the relevant code that adds that? Do you think it would be an easy fix (changing URLs, css styles, etc.) or more complex?
Thanks!
The new custom code window with its hinting is great. But please, please… make the text searchable! The behaviour in Chrome at the moment is that whatever text is visible at the moment can be searched in the browser, but not anything you would have to scroll to view. This makes it hard to locate and change existing CSS if you have a good deal entered in there. Thanks!
Thank you, Catalin.
You have resolved my first issue completely.
For my second one, the style.css is not minified. But okay. I try to resolve it myself. It looks, It is a big file and that’s why it is getting unresponsive.
Thank you for your kind support.
Hello chand3g,
If you want to change the height of the top menu, please try the code below. You have to edit the paddings to be 0.
@media (max-width: 767px){
.td-header-style-8 .td-header-top-menu {
padding:0;
}
}
For your second request, I have tested on my side and everything it ok with style.css. http://screencast.com/t/JnvylU3hN6a If your style.css is minified, your code will be messy and probably the code appears like this -> http://screencast.com/t/RH1Y23NIzt
Thank you for the message!
Is there a way to center the links of the main menu? (site: http://n4s.us )
Also, when it comes to customizing the css, what is the best practice to avoid the default style from appearing and then changing to the custom style as it loads? That tends to be very apparent at times.
Thanks,
Chris
Hello Sayeed,
If you want to disable all the sidebars in mobile and tablet mode, you need a bit of CSS to hide this option. Plase try the code below and place it in Theme panel->Custom CSS area, like this: http://screencast.com/t/5iPUuNZoso3l
@media (max-width:767px){
.td-ss-main-sidebar {
display:none;
}
}
The above code is only for posts. If you want to hide them for pages, it is not a simple task because it is not easy to target the sidebar class and it depending on how you set the sidebars for pages. As a method to add the sidebar for pages would be with Visual Composer and with Widgetised element, like this: http://screencast.com/t/dXPluCP9xJy or you have to edit each column for responsive from Visual Composer because it is not a specific class for this kind of sidebar to hide it with CSS, like this -> http://screencast.com/t/avmaxUjj5Ala
The code is ->
@media (max-width:767px){
.wpb_widgetised_column {
display:none;
}
}
Please notice that the more article box is not displayed for the mobile version by default.
@media (max-width: 767px){
.td-more-articles-box {
display: none !important;
}
}
If you want to activate for a mobile version you have to switch to display:block!important
For your second request, if you want to reduce the size for the next/prev button on smart list 7 you have to use a bit of CSS. Please try the code below and place it in Theme panel->Custom CSS area.
.td-smart-list-button {
padding: 7px 10px;
font-size: 14px;
}
Hope this helps and let us know how it goes!
Thank you for the message!
Hello Catalin,
How to change the height of the top menu because it covers a lot of space on small screens.
I haven’t do any changes in the style.css but when I open it in WordPress editor, it gets unresponsive. It looks that the file is getting slow from any other load. If it gets down, the chances of site’s downtime could be maximum.
I just want to know, is there any issues with this file when it is opened in wp editor.
Thank you.
Hello chand3g,
I have checked your website and saw that you are using Header Style 8. Please try the code below and add it in Theme panel->Custom CSS area and then your top bar menu will be displayed in the mobile version.
The code is ->
@media (max-width: 767px){
.td-header-top-menu-full {
display:block!important;
}
.td-header-style-8 .td-header-top-menu {
display: block!important;
}
.td-header-sp-top-menu {
display: block !important;
}
.td-header-style-8 .td-header-top-menu {
margin-left:0;
width: 100%;
}
}
The result you should see here -> http://screencast.com/t/MRdAUcys3PK
For your second request, unfortunately, I do not understand very good on what you are referring to. Please provide more details about your desired changes so I will be able to provide a more accurate response.
Thank you for the message!
Catalin,
Also, I would like to share here that style.css is getting unresponsive when I open it in the WordPress editor. I have purchased the theme then it doesn’t happen with me. Is there any issue in the theme version at the moment?
Let me know how to resolve it.
Hello,
This can be done either with css or by removing the date from particular block types in the code.
For example if I want to remove the date in a particular block, for example a big grid 1, I would use this code
.td_block_big_grid_1 .td-post-date{
display:none!important
}
If you wish to remove the date on another block, you can simply use the browser inspector and change the first class (.td_block_big_grid_1 with the class from the block you want to remove the date from)
I hope this helps.
Thank you!
Hi
Replace the code from header-style-7.php file with this one: http://pastebin.com/MTxJW8zY – http://screencast.com/t/GiQ05BLPA Place the ad code in custom ads spots from theme panel and replace the required numbers as I indicated in screen.
Also you will need this css in theme panel > custom code > custom css: http://screencast.com/t/s7ovP3m4n
.td-header-sp-ads-left{
width: 35%;
float: left!important;
}
.td-header-sp-ads-right{
float: right!important;
width: 35%;
}
.td-header-style-7 .td-header-sp-logo{
width: 30%;
}
.td-header-sp-ads-left .td-a-rec img {
margin-left: 5px;
}
.td-header-sp-ads-right .td-a-rec img{
margin-left: -5px;
}
@media(max-width: 768px){
.td-header-sp-ads-left, .td-header-sp-ads-right{
width: 49%;
}
}
Note that I’ve tested this only with header style 7. For others header styles you will need additional customizations.
Thanks!
Hi
Indeed the last css don’t apply at the category tags for each post, sorry about that I missed some selectors. To achieve that replace that css with this one: http://screencast.com/t/OsUfXSWnCl
.td_mega_menu_sub_cats .block-mega-child-cats a, .td_block_mega_menu .td-post-category{
height: inherit;
}
Thanks!
Hi Nicolai,
1. You can use this css to align the footer logo:
.footer-logo-wrap{
text-align:center!important;
}
result: http://screencast.com/t/De1HE5x2ui
2. Unfortunately the mega-menu does not work with sub-menus. It will grab every sub-category of the main one (including level 2 sub-categories). This is the way it was created. Unfortunately there are no option is this matter. There is a way to do it, but it involves editing the theme files. you can edit this file like so:
http://screencast.com/t/6tWO1mO5ecko
Now it will only show the parent category and no child categories.
before: http://screencast.com/t/RmM1wzCxO2 after: http://screencast.com/t/0NQt6ysm4C
I hope this helps.
Thank you!
Hello snaxzer,
Unfortunately, our theme does not have such an option to minify the style.css file and we cannot recommend any plugins with this functionality because is not tested with our theme. For minifying this file we are using CloudFlare for our demo and works fine. If you want to read other views from our users, please check this topic -> https://forum.tagdiv.com/topic/tip-how-to-easily-minify-your-css-without-breaking-your-site/
One of our top members here on the forum wrote his own optimization tutorial here:
https://forum.tagdiv.com/topic/tutorial-chriss-custom-optimizations-for-functions-php-etc/
Hope this helps!
Thank you for the message!
Hi
Thanks @Chris for your feedback!
@gmaio you can load the css and js conditional by adding a hook in functions.php file like here:
add_action( 'wp_enqueue_scripts', 'dequeue_unwanted_scripts', 2000 );
function dequeue_unwanted_scripts(){
if (is_page(array('page-id1', 'page-id2'))){
wp_dequeue_style( 'file-id' );
}
if (is_single(array('page-id1', 'page-id2'))){
wp_dequeue_style( 'file-id-' );
}
}
Note that this is just a basic example. You have to replace the page-id with the numeric id of your page and the file id with the specific id for each specific resource. To get the page id follow this link: http://screencast.com/t/9V7zgx6WK and to get the file id use the indicated file function in our page-speed guide: https://forum.tagdiv.com/how-to-make-the-site-faster/ – http://screencast.com/t/EYWMMocPrN The required conditions for your resources may differ then the ones I’ve indicated in above example and also you have to make sure that by removing some resources the page load won’t be affected.
Please consider that this is a complex task which require advanced coding skills, also many customization and tests. If you can’t do this by yourself my advice is to look for someone which can help you with this or hire a freelancer to do it for you as we can’t offer any type of custom work at the moment.
Thanks!
-
This reply was modified 10 years by
Andrei L..
Hello,
There are options for removing this post data from the theme panel, but if you remove them from there, they will not appear in the modules and blocks. So the best thing to do in this case is to hide them with css. You will need to be more specific as to where you want them removed and where not to as the ‘three little boxes’ is not particularly specific. Please provide a link to your website so we can see your homepage and specify if you want the data removed from the article itself or on the modules and blocks on the homepage so i can provide the proper css code for it.
Thank you!
Hi,
2. If you are using header style 8 , the sticky menu problem will be fixed in a future update, until then please use another header style. if you do not use headers style 8 and you need a css code for the sticky menu, then please provide a link to your website so i can create the code by inspecting your site.
3. Unfortunately the theme has no option for ads outside it’s main container. You will need to either hard-code it or find a plugin that has such an option.
4. I cannot confirm anything about the disqus plugin other then the fact that our users seem to be satisfied with it. The plugin is not tested. I cannot provide answers for plugins we have not officially tested. You will need to try it out as it is a free plugin and see if the comment counter will work with the plugin.
Thank you for your understanding.
Hi Catalin,
I think, you didn’t read my message, what I have written.
I have already used the CSS you have suggested to other buyers but that CSS is not working with me. It doesn’t do any changes in my output.
Let me know what to do?
Thanks for the quick reply Catalin.
How about overriding the function (from functions.php in the child theme) using higher priority?
I tried the following code (screenshot) and it’s working well, not loading any of the default files, but I’m unsure if it could be good as a long-term solution.
function override_fonts() {
td_global::$default_google_fonts_list = array (
'653' => array(
'css_style_id' => 'google_font_work_sans',
'url' => td_global::$http_or_https . '://fonts.googleapis.com/css?family=Work+Sans:400,700'
),
'654' => array(
'css_style_id' => 'google_font_bitter',
'url' => td_global::$http_or_https . '://fonts.googleapis.com/css?family=Bitter:400,700'
),
);
}
add_action( 'init', 'override_fonts', 20 );
↑ Replace default fonts (Open Sans and Roboto) with custom ones (Works Sans and Bitter, also from Google)
Each plugin you add may load in its own custom CSS and Javascript calls. Not easy to “merge” all of that without some serious hacking.
For example if you know you’re going to use the same 10 plugins, you could open up the plugins themselves, and remove the loading of the css and js, then merge all of those into single css and js files and load in footer.
Of course, if you knew how to do that you likely would not be asking how to do it here.
Using the Speed Booster you can optimize some of that to load in footer after main page load.
Some plugins you can disable loading custom CSS and have it accept (inherit) the site CSS.
YOu can also hack the Google fonts to load Google’s CSS into your own style.css but that is also a bit advanced.
Anyway – just some feedback on what that all entails.
Sir, please help me to fix this
Remove render-blocking JavaScript:
http://www.snaxzer.com/wp-includes/js/jquery/jquery.js
http://www.snaxzer.com/…includes/js/jquery/jquery-migrate.min.js
http://www.snaxzer.com/…assets/js/jquery.themepunch.tools.min.js
Optimize CSS Delivery of the following:
http://www.snaxzer.com/wp-includes/css/dashicons.min.css
http://www.snaxzer.com/…wp-includes/css/jquery-ui-dialog.min.css
http://www.snaxzer.com/…_composer/assets/css/js_composer.min.css
I am using speed booster plugin with WP super cache and CloudFlare enabled.
I have followed speed booster tutorial but after adding provided code in tutorial to functions.php I am not getting ID for above mentioned js and css
Hi there,
I’ve seen that at every page request there are in the page header the following calls generated by wp_head():
<link rel='stylesheet' id='contact-form-7-css' href='http://43b.60a.myftpupload.com/wp-content/plugins/contact-form-7/includes/css/styles.css?ver=4.3.1' type='text/css' media='all' />
<link rel='stylesheet' id='cookielawinfo-style-css' href='http://43b.60a.myftpupload.com/wp-content/plugins/cookie-law-info/css/cli-style.css?ver=1.5.3' type='text/css' media='all' />
<link rel='stylesheet' id='wpus-bar-css' href='http://43b.60a.myftpupload.com/wp-content/plugins/wp-ultimate-search/css/square.css?ver=4.4.2' type='text/css' media='all' />
<link rel='stylesheet' id='google_font_open_sans-css' href='http://fonts.googleapis.com/css?family=Open+Sans%3A300%2C400%2C600%2C700&ver=4.4.2' type='text/css' media='all' />
<link rel='stylesheet' id='google_font_roboto_cond-css' href='http://fonts.googleapis.com/css?family=Roboto+Condensed%3A300italic%2C400italic%2C700italic%2C400%2C300%2C700&ver=4.4.2' type='text/css' media='all' />
<link rel='stylesheet' id='evcal_google_fonts-css' href='//fonts.googleapis.com/css?family=Oswald%3A400%2C300%7COpen+Sans%3A400%2C300&ver=4.4.2' type='text/css' media='screen' />
<link rel='stylesheet' id='evcal_cal_default-css' href='http://43b.60a.myftpupload.com/wp-content/plugins/eventON/assets/css/eventon_styles.css?ver=2.3.17' type='text/css' media='all' />
<link rel='stylesheet' id='evo_font_icons-css' href='http://43b.60a.myftpupload.com/wp-content/plugins/eventON/assets/fonts/font-awesome.css?ver=4.4.2' type='text/css' media='all' />
<link rel='stylesheet' id='wordpress-popular-posts-css' href='http://43b.60a.myftpupload.com/wp-content/plugins/wordpress-popular-posts/style/wpp.css?ver=3.3.3' type='text/css' media='all' />
<link rel='stylesheet' id='evo_wv_styles-css' href='http://43b.60a.myftpupload.com/wp-content/plugins/eventon-weekly-view/assets/wv_styles.css?ver=4.4.2' type='text/css' media='all' />
<link rel='stylesheet' id='js_composer_front-css' href='http://43b.60a.myftpupload.com/wp-content/plugins/js_composer/assets/css/js_composer.min.css?ver=4.8.1' type='text/css' media='all' />
<link rel='stylesheet' id='td-theme-css' href='http://43b.60a.myftpupload.com/wp-content/themes/Newsmag/style.css?ver=2.3.5' type='text/css' media='all' />
<script type='text/javascript' src='http://43b.60a.myftpupload.com/wp-includes/js/jquery/jquery.js?ver=1.11.3'></script>
<script type='text/javascript' src='http://43b.60a.myftpupload.com/wp-includes/js/jquery/jquery-migrate.min.js?ver=1.2.1'></script>
<script type='text/javascript' src='http://43b.60a.myftpupload.com/wp-content/plugins/cookie-law-info/js/cookielawinfo.js?ver=1.5.3'></script>
<script type='text/javascript' src='http://43b.60a.myftpupload.com/wp-includes/js/underscore.min.js?ver=1.6.0'></script>
<script type='text/javascript' src='http://43b.60a.myftpupload.com/wp-includes/js/backbone.min.js?ver=1.1.2'></script>
<script type='text/javascript' src='http://43b.60a.myftpupload.com/wp-includes/js/jquery/ui/core.min.js?ver=1.11.4'></script>
<script type='text/javascript' src='http://43b.60a.myftpupload.com/wp-includes/js/jquery/ui/widget.min.js?ver=1.11.4'></script>
<script type='text/javascript' src='http://43b.60a.myftpupload.com/wp-includes/js/jquery/ui/position.min.js?ver=1.11.4'></script>
<script type='text/javascript' src='http://43b.60a.myftpupload.com/wp-includes/js/jquery/ui/menu.min.js?ver=1.11.4'></script>
<script type='text/javascript' src='http://43b.60a.myftpupload.com/wp-includes/js/jquery/ui/autocomplete.min.js?ver=1.11.4'></script>
<script type='text/javascript' src='http://43b.60a.myftpupload.com/wp-content/plugins/wp-ultimate-search/js/visualsearch.min.js?ver=4.4.2'></script>
This causes a huge overhead at every page request so that, how can I can get these resources locally in order to reduce the TCP/IP connections and to encrease the site performances?
Moreover, some css and js load are not needed for every page so I could conditionally load these resources only where needed: how can I get this behaviour?
Thanks in advance for any appreciated help.
Giuseppe
Hello,
This request is not easy to fulfill unfortunately as we will have to recreate the css for all the elements. Maybe in a future version we will be able to implement different widths for the theme, but at the moment there is no such plan.
Thank you for your suggestion.