DIsplay none bad for Seo? Alternatives in code

Posted in: Newspaper
Post count: 268

Hi,

you suggest me some change (display:none) in css to hide or delete some functions…

problem is that it seem bad for seo
http://seoshrugged.com/2015/11/30/does-google-crawl-css-displaynone-content/

so I want to know what code or functions to eliminate instead of using diplay:none

in particular

1) hide post views
.td-post-views{display:none!important}

2) hide author of block pages and categories, but I leave it on biggrid 1
.page .td-post-author-name{display:none}.category .td-post-author-name{display:none}.td_block_big_grid_1 .td-post-author-name{display:initial!important}

3) hide pulldown on categories (on right)
.category .td-wrapper-pulldown-filter{display:none}.home

4) hide next/prev on related articles
.td_block_related_posts .td-next-prev-wrap{display:none}

Post count: 22421

Hi,

It is a known fact that google detects hidden content. Unfortunately if you want those changes without css, you will have to add extra conditions in PHP and rewrite the theme code to have it only show elements in certain conditions.
1) You can disable post views from the theme panel but they will not show up anymore in the back-end and also sorting options that depend on the post views will not work anymore.
2) This needs several conditions in php to work. There is no easy solution I can provide.
3) The pulldownj on categories can easily be removed from the code here:
https://forum.tagdiv.com/topic/eliminate-7-days-popular-and-by-review-score-from-dropdown-menu/
4) You can remove the pagination by removing this code: http://screencast.com/t/bpquPfkSaFmy

Not all requests can be done easily from the php files.
Thank you!

Post count: 268

Hi Bogdan,

For 1) and 2) I’ll thank you to tell me where to find those functions in php anyway
and then maybe I can make some tests…

Thanks

Post count: 22421

Hi,
1) The code for the post views can be found here: http://screencast.com/t/ba0q23Nt
2) The author function can be found here: http://screencast.com/t/qFNo8We1
You can try a few tests and add conditionals with if / else and you can make use of the wordpress codex to get function references.
Thank you!

Post count: 268

Hi Bogdan, thanks

1) To hide post views in posts without use css I comment follow line in single_template_2.php

<div class=”td-module-meta-info”>
<?php echo $td_mod_single->get_author();?>
<?php echo $td_mod_single->get_date(false);?>
<?php //echo $td_mod_single->get_views();?>

2) For leave author only on post, an hide from page and categories blocks
may be I could use a condition in
http://screencast.com/t/XAOzPjVnC

Do you have any suggestions?

Thanks

  • This reply was modified 10 years by Bintmusic.
Post count: 23312

Hello Bintmusic,

1)Please notice that if you want to follow this method you have to do it manually for each template in accordance with that template used, like this -> http://screencast.com/t/HAQC8eQ05
2)For good results you have to use is_category() condition and not in_cateogry(). For more information about these conditions, please check here -> https://developer.wordpress.org/reference/functions/in_category/ -> https://developer.wordpress.org/reference/functions/is_category/ Also, another possibility for you would be to edit some core files in order to achieve as you wish, like this -> http://screencast.com/t/xTotByXYDabH -> http://screencast.com/t/mM4MwQzx Please notice that you have to remove for each template and module the get_author function in order to achieve as you wish. Above I gave you an example on how can be done (for posts and modules). Here you can see a list of our modules and blocks -> http://screencast.com/t/6OH9dm6nrp

Hope this helps!

Thank you for the message!

Post count: 268

Hi Alin Thanks

for hide author from all category pages I try to change with the function you show me in
td_module_single_base.php (see in bold)

//$show_stars_on_review – not used
function get_author() {
$buffy = ”;
if (td_util::get_option(‘tds_p_show_author_name’) != ‘hide’ and !is_category()) {

But it does not work… something wrong?

Thanks!

Post count: 268

Hi,

I solved

I modified a module that ran categories…

Thanks

Viewing 8 posts - 1 through 8 (of 8 total)
The forum ‘Newspaper’ is closed to new topics and replies.