Hi guys!
Hi @Chris S, I have one question for you.
Nice to hear that your site work with AMP from about half-year, the normal ads (settings from theme) works below AMP?
Greetings to all
Hi Catalin,
Your kind to give me a screenshot were this string “at” appear in your translations?
Thank you very much Bogdan
Hi Bogdan,
You forgot the single quotes 🙂
Yes, it works.
Thank you
Hi Bogdan,
Thank you very much for your explanation, yes you’re right I disable this options from the control panel because the name of the author is a little large and in combination with date in mobile view it looks very bad.
So, the solution is activate again those two options and hide with the css the date?
This will do the trick in GW?
Hi Catalin,
I will provide the information (I tried with this new syntax but the same results).
Thanks
If there is any quick fix, please share or give us an approximate date. (owners who pay the banners ask for solution and we don’t know what to say)
Thank you
So, i’m afraid that i’m the only one that use the premium version with this theme.
Hi Catalin,
You see any error in this implementation?
The line in question is 322 from td_module_single_base.php:
$buffy .= '<span class="td-nr-views-' . $this->post->ID . '">' . td_page_views::get_page_views($this->post->ID) . " " . "Visitas" .'</span>';
I talk with the host and they have no idea why the string “Visitas” disappear after 1 second when the page is loaded.
Hi Catalin,
Im not talking about any plugin, is the plugin that you say is compatible with your theme YOAST SEO (the only diference is that is the premium version)
Im allways use only three plugins:
- Yoast
- VC
- Speed-booster
Hi Andrei,
Hi Chris,
I opted for the best solution I think… (I switch from Yoast free to premium)
- submitting the sitemap won’t work for this (this practice works only to remove some warning related with the sitemap itself). Believe me, the 404s come back even if it’s been years (and I talk about links that are wholly obsolete and dead without internal/external baklinks or suchlike)
- the permanent redirect I dont think that is the right solution for my case because the user experience is not so friendly and the bounce rate grow up (the pages/posts that I want to get rid have nothing to do with my actual content).
Anyway, thanks to both for the feedback,
Regards
Is safe to add it to private $allowed_plugins or
remove the function __construct ?
Hi @brett707,
Open your index.php
On the line 6 you have get_header();
replace this line with:
if (function_exists('get_header')) {
get_header();
}else{
/* Redirect browser */
header("Location: http://domain.com/ ");
/* Make sure that code below does not get executed when we redirect. */
exit;
};
and change “domain” with your domain
Hi Catalin,
Thank you very much again.
Here you have for example a link (you’ll see how the string “visits” disappear after the page is loaded.
Thanks.
Hi Catalin,
I found how comment the snippet to put one space for “Visits”, below is the code:
function get_comments() {
$buffy = '';
if (td_util::get_option('tds_p_show_comments') != 'hide') {
$buffy .= '<div class="td-post-comments">';
$buffy .= 'post->ID) . '"><i class="td-icon-comments"></i>';
$buffy .= get_comments_number($this->post->ID) . " " . "Comments";
$buffy .= '';
$buffy .= '</div>';
}
return $buffy;
}
function get_views() {
$buffy = '';
if (td_util::get_option('tds_p_show_views') != 'hide') {
$buffy .= '<div class="td-post-views">';
$buffy .= '<i class="td-icon-views"></i>';
// WP-Post Views Counter
if (function_exists('the_views')) {
$post_views = the_views(false);
$buffy .= $post_views;
}
// Default Theme Views Counter
else {
$buffy .= '<span class="td-nr-views-' . $this->post->ID . '">' . td_page_views::get_page_views($this->post->ID) . " " . "Visits" .'</span>';
}
$buffy .= '</div>';
}
return $buffy;
}
but for some reason:
- for comments works ok
- for visits, after the page is loaded the string “Visits” disappears
Currently I’m using your solution only for the Comments.
P.D.: I don’t understand why is happening, in my local server works like a charm (both changes) but on real environment, nope. I have paid attention to cache and I don’t use third plugins.
Thank you.
Hi Catalin,
Thank you, thank you and thank you very much.
Works like a charm. (last question: ¿I can add & n b s p ; in the beginning of the word “Visits” ? because seems that the number counter and the word they are glued.
like:
$buffy .= '<span class="td-nr-views-' . $this->post->ID . '">' . td_page_views::get_page_views($this->post->ID) . " Visits" . '</span>';
Again, thank you very much for your effort.
Hi Catalin,
Ok, I stay as I am right now.
Thank you for your time
Hi Catalin,
I think that you lost the thread. I give you the modifications (htaccess & index.php), because I think that maybe can produce the warning into wp-includes/functions.php
So, my question was about “wp-includes/functions.php” and not the topic index.php which by the way, I’ve opened near 2 weeks ago
and only this modifications:
– in the index.php we put this snippet because we get errors “PHP Fatal error: Call to undefined function get_header()…. on line 6”:
if (function_exists('get_header')) {
get_header();
}else{
/* Redirect browser */
header("Location: http://theme.com/ ");
/* Make sure that code below does not get executed when we redirect. */
exit;
};
– and in htaccess:
/*CHRISTOPHER's CUSTOM MODS - 1.10.15 rev15A - (c) 2010-2015 Chris Simmons */
remove_action( 'wp_head', 'wp_generator' ) ;
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','print_emoji_detection_script',7);
remove_action('wp_print_styles','print_emoji_styles');
function no_errors_please(){
return 'You appear to be up to no good. Please stop now!';
}
add_filter( 'login_errors', 'no_errors_please' );
/* Disable YOAST SEO Admin Bar. */
function mytheme_admin_bar_render() {
global $wp_admin_bar;
$wp_admin_bar->remove_menu('wpseo-menu');
}
// and we hook our function via
add_action( 'wp_before_admin_bar_render', 'mytheme_admin_bar_render' );
function delete_enclosure(){
return '';
}
add_filter( 'get_enclosed', 'delete_enclosure' );
add_filter( 'rss_enclosure', 'delete_enclosure' );
add_filter( 'atom_enclosure', 'delete_enclosure' );
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 );
add_action('init', 'myoverride', 100);
function myoverride() {
remove_action('wp_head', array(visual_composer(), 'addMetaData'));
}
function dequeue_visual_composer_css() {
if (is_single()) {
wp_dequeue_style('js_composer_front');
}
}
add_action('wp_enqueue_scripts', 'dequeue_visual_composer_css', 1003);
+1
Nevermind, I made the change into parts/footer/td_footer_extra.php
Hope is fixed in the next update.
Regards.
Great,
Thank you Catalin.
You have any idea why appear this error
Hi Catalin,
The second link (site not reachable) it has nothing to do with my problem.
With the first one https://forum.tagdiv.com/topic/call-to-undefined-function-get_header/ , ¿ I have to replace the little snippet in your index.php ?
I mean, I have to change the actual?
get_header();
to
if (function_exists('get_header')) {
get_header();
}else{
/* Redirect browser */
header("Location: http://" . $_SERVER['HTTP_HOST'] . "");
/* Make sure that code below does not get executed when we redirect. */
exit;
}; ?>