- NewspaperCreate Custom Code with the browser’s Inspector or the Live CSS Box
- NewspaperScroll Animation
- NewspaperWP Rocket and Newspaper Theme: Optimization Guide
- NewspaperHow to setup Twitch for Social Counter
- NewspaperModal Popup
- NewspaperFlex Block Settings Guide
- NewspaperAutoptimize Plugin – install and configuration
- NewspaperAdding Multiple Authors to Your Articles
- NewspaperDesign your Post Pages using the Cloud Library Templates
- NewspaperBig Grid Flex Settings
- NewspapertagDiv Composer Tutorial
- NewspaperTheme modules and blocks
- NewspaperThe Mobile Theme
- NewspaperCompare theme files – Winmerge tutorial
- NewspaperUsing Other Ads
- NewspaperBlock settings tutorial
- Using custom fonts
- Using typekit fonts
- NewspaperChild Theme Support
- NewspaperHow to Make the Site Faster
Hi,
The menu loaded on mobile screens it’s different in appearance and functionality from the one used for the tablets and desktop screens so the mega menu dose not work on mobiles. In order to have an category with it’s subcategories you will have to add them like this: http://screencast.com/t/y9FnwtA0g which will be displayed like this in the mobile menu: http://screencast.com/t/lh5kwtedaaUP
A workaround would be to add the category twice in the menu from appearance > menus, once to display the subcategories as a mega menu and once to to add the subcategories as sub-items then use custom css to hide one on desktop/tablets and the other on mobiles.
Sorry about the inconvenience. You can also follow this topic: https://forum.tagdiv.com/topic/changing-the-mobile-menu/
Hope this helps!
Thanks
Hi,
Usually when using child theme the css added in the child theme css style sheet should work fine but note that using the child theme could cause other issues so in case you have some problem you should check if the child theme isn’t the cause of it.
You can use the speed booster plugin to move files to the bottom, this is speed related so you can follow this guides for this:
* https://forum.tagdiv.com/pagespeed-guide/
* https://forum.tagdiv.com/topic/can-i-add-plugins-css-to-footer/#post-6348
* https://forum.tagdiv.com/topic/pagespeed/
Hope this helps!
Thanks
Via CSS’s :nth-child(#) selector. Enter this in the theme panel’s custom CSS section:
.sf-menu li:nth-child(2) a {
color: #000;
}
Change #000 to the hex you want. I checked it on your site and it should work. If it doesn’t work, add an !important tag.
If you want to use the dark selector, add this too:
.sf-menu li:nth-child(2) a .sf-sub-indicator {
background-image: url('/wp-content/themes/Newspaper/images/sprite/elements.png');
}
Basically what I’ve done for my site is
(not using child themes as they add CSS redirects bad for SEO/speed)
a) search/replace all instances of fonts I don’t want to load from Google in my style.css file; using common font stacks for fallback such as 'Open Sans',Arial,sans-serif
(if you don’t know what font stacks are, see: http://cssfontstack.com/
b) set all my fonts in theme panel to ‘default’ so there is no code if/then trying to insert any custom fonts into header/footer/speedbooster
c) commented out the code in functions.php which loads google fonts on the page; and also removed the section of code which has the various links to theme fonts on google I won’t be using; no need to have if/then code asking to load fonts from google if I’m never going to do that via theme code (as per examples in my prior posts in this thread); need to both or you will get error. Same code in 4.22, 4.3 and 4.4 versions of theme.
d) I grabbed the link from google fonts website for the font I wish to use (as per my example above in this thread), then pulled the actual css from that link so I won’t be loading the links to the fonts from their CSS file (one less CSS file loaded on page); placed this at bottom of my own style.css file after the minified code, so that it lives in its own section after theme styles.
All of this was done with caching off, mod_pagespeed off, so that changes are picked up immediately. When editing my files I use either TextPad on the PC, or BBEdit on the Mac, to ensure my files have Linux/Unix line breaks since I’m using Linux web server. Some PC editors will put “Windows line breaks” in files, which are bad for Linux servers, in some cases, and can cause parsing errors. So, helps to know what you’re doing if editing core files for a web server.
PURPOSE OF ALL OF THIS:
1) speed up website
2) remove intermediate call to CSS style sheet on google, which may not have proper expiration headers/TTL, and may show “advisory” from testing GTMetrix,PageSpeed Insights, etc. – may help “rating” by removing one so-called issue caused by Google’s own system.
You do *NOT* need to do this, unless you have ALL OTHER optimizations in place. Many sites load their fonts from Google using their function call as it’s essentially loading from a CDN. However, “hacking” the theme for this purpose can help advanced users resolve those last couple of ratings issues, and also those obsessed with micro-optimizations.
WARNING
this hack must be done EVERY time you update the theme; so if not willing to do that, best to skip this whole subject and get on with creating great content which is better for SEO and SERPS than saving a couple of milliseconds on font loading.
You need to *decide* what fonts you wish to use for the theme.
If all of this is beyond you, then you can simply stick with the standard font usage as most sites do. What we’re talking about here is somewhat advanced; and if it doesn’t make sense, then you should likely skip this and worry about other necessary site optimizations.
If you look at my code from functions.php in 4.4 version of theme, you will also need to comment out the line that calls the Google fonts (using // ):
/* ----------------------------------------------------------------------------
CSS - front end
*/
function td_load_css() {
//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
}
and I deleted this
$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
}
}
You would still need to search/replace all instances of Google fonts in your style.css as I stated to replace all font stacks with the Google fonts you wish to use. Or, you’d need to look at the fonts in there to use for grabbing the CSS from Google Fonts to put at bottom of your style.css file.
Hi,
How can I remove the Slider wrap box behind the title? (the red box at the bottom of the image below)

I’ve removed it before but deleted it and the CSS i add now seems to remove the Title text itself aswell.
Thanks!
Add that code in the Custom CSS area, correct? Done.
In the attachement.php I have:
<div class="alignleft"> Previous Image <?php previous_image_link();?></div>
<div class="alignright"> Next Image <?php next_image_link();?></div>
Is this incorrect in attachement.php?
i make that and some fonts still have “pt sans”typography. maybe should i make changes and on includes/wp_booster/external/bootstrap/td-bootstrap.css?
Hi,
Please try this css:
.td-boxed-layout .td-menu-background .td-menu-wrap {
border-bottom: none !important;
}
Or provide your site’s URL, I need to inspect this so I can provide a fix.
Thanks
Hi,
Please use this custom css and change this values as you like: http://screencast.com/t/SiUzFWedJ9
.page .td_block_wrap {
padding-bottom: 10px;
}
.page .td_mod_wrap, .td_mod2 {
margin-bottom: 15px;
}
Thanks
Hi,
Please edit the style.css file and replace all “PT Sans” fonts with “Open Sans”.
Thanks
Hi!
Could you tell me please how might happen that my block title color changed while i’m still having this code in css?
.block-title a, .block-title span, .block-title label {
background-color: transparent;
color: #444444;
}
Here color: #444444; in fact color: #ffffff;…
@lucial thank you
on version 3.5 i solve the issue on big slide with small pictures with this mod on custom css.
.iosSlider .td-slide-item-main .entry-thumb {
width: 745px;
}
but this mod, doesn’t work on version 4.4
the Christopher’s solution need generate thumbs and with 70.000 jpg images on my media library, takes a long, long, long time
Hi,
For your first issue, you can get rid of the breadcrumbs on search module like this: http://screencast.com/t/wd80UQ6nBuWy
You can remove them the same way for other module also.
Regarding issue #2 please note that those setting will work for the pages templates build and added with the page builder and when used the default template.
We know about #3 and we have this on our to-do list to fix in the next update.
For the 4-th issue you could use this css to add a border to the top of page wrapper, like this: http://screencast.com/t/kcV8d2ZLj4R
.td-page-wrap {
border-top: 2px solid #a7a7cb !important;
}
#5 I’m not sure how this happens but you can use custom css to hide the banner only on homepage, like this: http://screencast.com/t/rDggCB6SIlUl
.home .header-content-rec .td-g-rec-id-header {
display: none;
}
and for post template 4 you can use this: http://screencast.com/t/K4PjrKpr3nI
.single_template_4 .header-content-rec .td-g-rec-id-header {
display: none;
}
Regarding the option for the banner to show before logo, you can simply do it like this: http://screencast.com/t/9cq1f3v9p5Bi
For the background of sidebar ad you can try this: http://screencast.com/t/BJhaoVkxCs1C
.td-g-rec-id-sidebar .adsbygoogle {
position: relative;
top: 0px;
margin-bottom: 0px !important;
}
.td-g-rec-id-sidebar {
background-color: #a7a7cb;
padding-top: 20px;
padding-bottom: 10px;
margin-bottom: 20px;
}
Also use this sizes fro the sidebar Adsense ads: http://screencast.com/t/wlsdqlsI3p
Hope this helps! Please let me know!
Thanks
Hi,
Please use this custom css: http://screencast.com/t/64WxHqhTc9N
.page .td-a-rec-id-custom_ad_1, .page .td-a-rec-id-custom_ad_2, .page .td-a-rec-id-custom_ad_3, .page .td-g-rec-id-custom_ad_1, .page .td-g-rec-id-custom_ad_2, .page .td-g-rec-id-custom_ad_3 {
margin-bottom: 0px;
}
Thanks
Hi,
Thanks Christopher/TheMediumUTM!
@delgermurun Please use this custom css in theme panel > custom css: http://screencast.com/t/qEatpQQQ
.td-g-rec-id-header {
z-index: 0;
}
Thanks
Ok, thank you!
I’m using child theme now, so the update won’t be a problem for my style.css i hope
What about stuff like this in the beginning of my source:
link rel=’stylesheet’ id=’google-font
thare are some google fonts, can i move it to the bottom somehow?
Hi,
Thanks Christopher!
@Pjump I missed the css, this may be due to a plugin which applys a negative margin to the list, please use this css: http://screencast.com/t/scaoXYNEd
.page #insideWrapperFull ul, ol {
margin: 0px 0 0px 0 !important;
list-style-type: mongolian;
}
Sorry about this!
Thanks
hi,
Should work fine, I have tested this live on your site as you can see in the screen, must be something you are not doing right, please make sure you add the custom css in theme panel > custom css save it, also empty cache/ purge files if you use any cache or CDN plugins after this try again, if still dose not work please add this css to style.css file save it and check again.
Please let me know!
Thanks
Hi,
Please also make sure you change this span class into span12, like this: http://screencast.com/t/0Xm9bF1Bg6
After this please remove the previous css and user this instead: http://screencast.com/t/LEnvPM1EiFa
Please let me know if you manage to do it and also provide your site’s url so I can inspect this if you don’t.
Thanks
Hi,
The best way would be to replace and/or add it in your css style sheet this way your css will be loaded with the main css, note though that the style.css file can be modified within an theme update so you would have to make this changes again after an update.
Hope this helps!
Thanks
If I remove as you mentioned above
$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
}
}
I get
Parse error: syntax error, unexpected $end in /home/site/public_html/wp-content/themes/Newspaper/functions.php on line 1505
Hi,
Thanks TheMediumUTM!
@craigmc
More exactly you could use this custom css to change the font family/size/color/weight.. and so on for all modules: http://screencast.com/t/dglLLI7O2JM
.td_mod_wrap .meta-info {
font-family: 'Sacramento', sans-serif;
color: #E62222;
font-size: 20px;
font-weight: bold;
}
Thanks
How do I know what font I am using ?
I found the code. What to do here, to remove the fonts I don’t use ?
/* ----------------------------------------------------------------------------
CSS - front end
*/
function td_load_css() {
//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);
}
//bootstrap - custom built - it was generated via compilation of /external/bootstrap-master/less/bootstrap.less
wp_enqueue_style('td-bootstrap', get_template_directory_uri() . '/includes/wp_booster/external/bootstrap/td-bootstrap.css', '', TD_THEME_VERSION, 'all' );
//main theme style - set the TD_DEBUG_USE_LESS flag in /includes/app/td_config.php and the theme will load the less files and compile them for you
if (TD_DEBUG_USE_LESS) {
wp_enqueue_style('td-theme', get_template_directory_uri() . '/td_less_style.css.php', array('td-bootstrap'), TD_THEME_VERSION, 'all' );
//wp_enqueue_style('td-theme', get_template_directory_uri() . '/style.less', array('td-bootstrap'), TD_THEME_VERSION, 'all' );
} else {
wp_enqueue_style('td-theme', get_stylesheet_uri(), array('td-bootstrap'), TD_THEME_VERSION, 'all' );
}
}
add_action('wp_enqueue_scripts', 'td_load_css');