- TutorialsDefault Block Settings Guide
Hi
Please make sure that you added the correct html code in theme panel, for more details please check this link where I’ve provided a valid example for banner ads: https://forum.tagdiv.com/topic/header-ad-breaking-header/
Thanks!
UPDATED FUNCTIONS HAXX AUG 2016
— supercedes old and moldy stuff in this long thread
Works for me on Apache; if not for you, then you messed something up elsewhere.
This goes at BOTTOM of the /theme/functions.php file
Don’t know where that is, then stop right now, buddy. Learn to use FTP!
/** ========================================== */
/** CUSTOM OPTIM CODE : by Christopher Simmons - REV 8.17.16 */
// Remove jQuery Migrate Script from header and Load jQuery from Google API
function simmonsbunny_remove_jquery_migrate_load_google_hosted_jquery() {
if (!is_admin()) {
wp_deregister_script('jquery');
wp_register_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js', false, null);
wp_enqueue_script('jquery');
}
}
add_action('init', 'simmonsbunny_remove_jquery_migrate_load_google_hosted_jquery');
add_action('init', 'cng_author_base');
function cng_author_base() {
global $wp_rewrite;
$author_slug = 'profile'; // change slug name
$wp_rewrite->author_base = $author_slug;
}
add_filter( 'jpeg_quality', create_function( '', 'return 50;' ) );
/** functions for headcleaner */
function rm_generator_filter() { return ''; }
add_filter('the_generator', 'rm_generator_filter');
remove_action('wp_head','wlwmanifest_link');
remove_action('wp_head','rsd_link');
remove_action('wp_head','feed_links', 2);
remove_action('wp_head','feed_links_extra', 3);
remove_action('wp_head','start_post_rel_link', 10, 0);
remove_action('wp_head','adjacent_posts_rel_link_wp_head', 10, 0);
remove_action('wp_head','print_emoji_detection_script',7);
remove_action('wp_print_styles','print_emoji_styles');
function remove_cssjs_ver( $src ) {
if( strpos( $src, '?ver=' ) )
$src = remove_query_arg( 'ver', $src );
return $src;
}
add_filter( 'style_loader_src', 'remove_cssjs_ver', 10, 2 );
add_filter( 'script_loader_src', 'remove_cssjs_ver', 10, 2 );
function remove_pingback_url( $output, $show ) {
if ( $show == 'pingback_url' ) $output = '';
return $output;
}
add_filter( 'bloginfo_url', 'remove_pingback_url', 10, 2 );
/** functions for security */
function no_errors_please(){
return 'You appear to be up to no good. Your IP logged and will be blocked.';
}
add_filter( 'login_errors', 'no_errors_please' );
function disable_reset_lost_password()
{
return false;
}
add_filter( 'allow_password_reset', 'disable_reset_lost_password');
function remove_lost_your_password($text)
{
return str_replace( array('Lost your password?', 'Lost your password'), '', trim($text, '?') );
}
add_filter( 'gettext', 'remove_lost_your_password' );
add_filter( 'send_email_change_email', '__return_false' );
/** functions for admin bar */
function mytheme_admin_bar_render() {
global $wp_admin_bar;
$wp_admin_bar->remove_menu('wpseo-menu');
}
add_action( 'wp_before_admin_bar_render', 'mytheme_admin_bar_render' );
add_filter( 'wpseo_use_page_analysis', '__return_false' );
function my_custom_css() {
echo '<style>
.misc-pub-section.yoast-seo-score.content-score { display: none; }
.misc-pub-section.yoast-seo-score.keyword-score { display: none; }
</style>';
}
add_action( 'admin_head', 'my_custom_css' );
function dequeue_yoast_css() {
wp_dequeue_style('yoast-seo-adminbar');
wp_deregister_style('yoast-seo-adminbar');
}
add_action('wp_enqueue_scripts','dequeue_yoast_css');
/*remove embeds */
function disable_embeds_init() {
remove_action('rest_api_init', 'wp_oembed_register_route');
remove_filter('oembed_dataparse', 'wp_filter_oembed_result', 10);
remove_action('wp_head', 'wp_oembed_add_discovery_links');
remove_action('wp_head', 'wp_oembed_add_host_js');
}
add_action('init', 'disable_embeds_init', 9999);
function project_dequeue_unnecessary_scripts() {
wp_dequeue_script( 'comment-reply' );
wp_deregister_script( 'comment-reply' );
}
add_action( 'wp_print_scripts', 'project_dequeue_unnecessary_scripts',100 );
/** End Christopher's magic bunny code; Copr. (c) 2013-2016 CLS */
========== and again ===============
THESE MISSIVES ARE COPR. © Christopher Simmons, all rights reserved. You may use this info, but you may *NOT* republish on your blog, in a book, or make claim any of this is originated by you. Seriously. I know warlocks and they can get bitchy.
-
This reply was modified 10 years by
simchris.
I would like the change the background header of the category pages (td-category-header) (eg: http://dev.ntv.ca/category/programs/) … but I can’t find that option … it must be somewhere 🙁
Hi,
I use category template 8 and I added the code, that I found on this forum, to get image in the background of the category box.
.td_category_template_8 .td-category-header {
background-image: url("bg-image.jpg");
background-repeat: no-repeat;
background-size:100%
}
What I’m looking for now is such a modification of this code, that will give me different images depending on the category. Now it’s the same image for all categories that use this template. Since all categories have different ids I suppose it could be done somehow (even manually by adding a code for each and every category, I have only 7 so it’s fine), am I right?
How/where to assign background (Header) for category template #6 and #8
Hello,
I would like to ask you how to change sidebar blocks css.
I tried to change margin between table widget header and content from 26px to 10px in main style.css
.vc_tta-container .vc_tta-color-grey.vc_tta-tabs-position-top.vc_tta-style-classic .vc_tta-tabs-container {
margin-bottom: 10px !important;
margin-right: 0;
border-bottom: 2px solid #4db2ec;
display: block;
}
However nothing changed :/
Please, how can i do that?
Best regards
M.
Hi
1. Do you want the header ad to be displayed only in posts from a specific category? If so that can be achieved by adding a condition in ads.php file: http://screencast.com/t/4jbC6dwEdvLI
if (in_category('category-slug')) {
echo td_global_blocks::get_instance('td_block_ad_box')->render(array('spot_id' => 'header', 'spot_title' => $tds_header_ad_title));
}
You just need to add category’s slug, name or id as a parameter for in_category() function and the add will be displayed only on posts which belongs to given category.
2. This can be achieved only with a change in theme’s code. You need to edit: td_block_mega_menu.php file and move the indicated line like here: http://screencast.com/t/Uj3bnfxkTuL You will also need this css in theme panel > custom code > custom css: http://screencast.com/t/Fvbm7xII7I
.td_mega_menu_sub_cats {
float: none;
}
Thanks!
Hi,
The style of the theme ads a min width to the logo and as you use a very narrow logo, it will require a bit of css for better positioning. Please use this code:
.td-politics .td-header-style-11 .td-logo-wrap-full{
min-height: 160px!important;;
}
.home .td-main-page-wrap{
padding-top:0!important;
}
I hope this helps.
Thank you!
Hi
Visual Composer does not control the navigation menus, it ony controls the content between header and footer, page’s content basically.
You can create a new menu under Appearance > Menus and add in it the desired items: http://screencast.com/t/aiTsOErj2oe – http://screencast.com/t/Lep6mEpX2H2 Fore more details about wordpress menus please check these links: https://forum.tagdiv.com/newsmag-main-menu/ – http://www.wpbeginner.com/beginners-guide/how-to-add-navigation-menu-in-wordpress-beginners-guide/
Hope this helps.
Thanks!
Hello,
I am trying to reduce the amount of request being made to load my website entirely. It looks like Google Fonts is responsible for 24% of the first load time. It is really affecting the load time and I hope you could help me to reduce it.
I still want to use the same default fonts (open sans and roboto) but not from a external source. Can you help me to get there, to use them locally instead?
– To remove the Google fonts request, do I need to remove the lines in the td_config.php file manually? Somewhere else too?
– Do I need to download the Google Fonts and convert them as WOFF? Then upload into ‘Custom Font files’? It that everything I need to do?
– What happens if I delete the Google fonts lines and don’t configurate a custom font. Which fonts
will then be taken over?
– Latest question: Can you tell me which fonts are used in each part of the theme? I see ‘default font’ everywhere (in the modules, header, footer …). Confusing.
Thanks in advance, I appreciate the help.
Kind regards,
John.
Hi
Try this css in theme apnel > custom code > custom css to change the backgropund color: http://screencast.com/t/iPFMRBWod
.td-header-wrap .td-header-menu-wrap-full, .td-header-wrap .td-header-menu-wrap, .td-header-wrap .td-header-top-menu-full, body .td-header-wrap .td-header-main-menu {
background-color: #1a1a1a!important;
}
Thanks!
At the top header menu I mean. Here’s the image http://prntscr.com/c6d4u5
The menu should lead to a specific page. Isn’t ? Please help me build the advertise page as your visual composer do not have essential addons to make things easier.
-
This reply was modified 10 years by
Hari.
Salut Cătălin,
Am adăugat exact același cod, exact pe aceleași poziții unde a fost indicat în topicul respectiv, însă nu funcționează. Mai precis, apare în wp_admin sursa 2, dar pe site nu se mai poate accesa niciun articol (apare header-ul și restul e alb). Poate din cauza modificărilor făcute între versiuni să fie
problema?
Mulțumesc!
HI
You added an ad-box on your homepage using Visual Composer and there is selected the header and to be displayed: http://screencast.com/t/EwLUF3uI9u9S To remove that ad edit the homepage and delete the ad-box. For more details about how to use Visual Composer please check this link: https://forum.tagdiv.com/newsmag-how-to-use-visual-composer/
Thanks!
Hi guys,
First I would like to say thank you for uploading this great theme.
I hope you can help me. I choose for the travel guides and ideas theme. I use the demo with content. Now I see a image on the homepage (see http://www.littleapple.nl for the image). I search and by the index I can change the image (10, 11, 12 etc). Only on which place are these images hiding? Off course I see the images in the library but I know there must be a place where I can upload my own pictures to use. Please help.
[vc_row full_width="stretch_row" parallax="content-moving-fade" parallax_image="10" el_class="td-travel-header"][vc_column][/vc_column][/vc_row][vc_row el_class="td-travel-features"][vc_column][td_block_5 custom_title="" sort="featured" limit="3"]
Thank you!
Kind Regards.
LailiejLoe
You can do anything with AMP except you cannot load funky scripts in the header, you must only load https elements, and you must have clean code with no old-skool inline styles like
<p align="center">
should be
<p class="pcenteed">
and the like.
AMP ads are simple, just make a hook in your functions.php file to load the small 250px graphic from adsense, using Google’s examples on the adsense website, and several tutorials online. It cannot be done in the TagDiv theme panel as the amp endpoint not part of theme.
Easy to hire a WP developer if none of that makes sense 🙂
Hi,
I’m using the header style 11 on the Newspaper 7 theme. There is a large white space between the logo and the content below that I can’t seem to get rid of. I believe this white space is an ad space placeholder.
I’ve attempted to disable the ad under the “ads > header ad” tab. However, that doesn’t get rid of the white space.
Please advise on how to get rid of the white space where an ad would be using header style 11.
Thank you!
on header of my site page, I do not think the option to update the address of the social networks. I can only change the address of the social networking site page footer on the way newspaper/theme panel. In the header for example the address of the facebook is like this: http://mobilidadesampa.com.br/mobilidadesampa and footer is https://www.facebook.com/mobilidadesampa/
Hello,
I enabled header ad on my website but the same advert appears also on the footer, unable to figure out why that is.
Please help
Thanks
I recently moved our site over to the Newspaper 7 theme (not from a previous Tag Div theme) and both Visual Composer and Newspaper 7 are updated to their latest versions and so is WordPress.
Our home page (static front page selected via the customizer) is a no-sidebar full width page template (Page Attribute: Default, Sidebar position: no-sidebar template selected). We use Google DFP for delivering our header advert and the header advert works perfectly on our home page and all posts that have a sidebar layout post template.
For some reason though, except for the front/home page, all newly created and existing pages or posts that use a no-sidebar full width layout the header ad does not appear with the Newspaper 7 theme. Even if I set up a new page with all settings exactly the same as our home page, the header ad still does not appear on the new page but it does appear on our home page.
In the Theme Panel, under Template Settings – Page Template: the CUSTOM SIDEBAR + POSITION is set to no-sidebar but I have tried every possible combination of theme panel default vs page attribute setting vs sidebar position setting but can never get the header ad to show on any no-sidebar page template or post template except for the Home page. The header ad only seems to work on pages and posts when a sidebar template is selected.
Could you please urgently assist with this as obviously it limits our layout options quite a bit if we cannot get the header advert to show on any no-sidebar pages or posts except for the home page.
Thank you.
Ps. Please get in touch with me via e-mail as I would like to keep the conversation and URL private. Thank you.
The site is coming along well championdads.com
But for the life of me, I can’t seem to change the main menue headings in the header (but I can alter the subcategories).
Also right down the bottom in the footer there is an about and contact link.
Where do you change the linkthrough URLs for those?
Thank you,
M
Hello,
Thank you for pointing this out. It is a css issue. Please use this code for a quick fix:
.td_category_template_6 .td-category-header{
z-index: 1!important;
}
I will pass this information on to the development team.
Thanks.
Hello,
I have tried so many times to save the google adsense code in the Header section of the theme panel and clicked on save button . it shows me that it is saved but when i revisit this page , i did not found any code that i had pasted in it. Also the adsense block is also not shown on the page. Is there is any work around where i can put adsense banner on header section .
Hi
Yes it is possible. Follow this steps:
– revert back the changes I’ve indicated in my previous message.
– add the ad code in one of theme’s custom ad spots
– create a new page and add an ad-block on it, select in ad-block the custom ad-spot which hold ad’s code: http://screencast.com/t/T9QrVpFshiG
– press the CLASSIC MODE button and copy the shortcode: http://screencast.com/t/09LWoaPqeUA
– edit the file corresponding with header style used and add this code here: http://screencast.com/t/lqG1ycAYcK – http://screencast.com/t/L4vk5oDVLPC
<?php echo do_shortcode('[vc_row][vc_column][td_block_ad_box spot_id="custom_ad_1"][/vc_column][/vc_row]'); ?>
In above example I’ve used custom ad 1 but you can use any custom ad spot from theme panel.
Thanks!
HI
To achieve the desired result you need to edit the file corresponding with header style used and move the indicated code like here: http://screencast.com/t/DeYdseojd You will also need this css in theme panel > custom code > custom css: http://screencast.com/t/PQwVcDkE This was an example for header style 1.
.td-header-sp-rec {
float: none!important;
margin-left: auto;
margin-right: auto;
}
Let me know how it goes.
Thanks!