By NexusStar on
How could I remove the string
"There is currently no content classified with this term."
from taxonomy term page.
I put in my template.php file following code (with Theme changed to my theme name) but it do nothing
function THEME_preprocess_node(&$variables, $hook) {
if(isset($variables['page']['content']['system_main']['no_content'])) {
unset($variables['page']['content']['system_main']['no_content']);
}
}
I do not want to use String Overrides module or CSS just want to remove it from the page.
Comments
Hi, Are you overriding the
Hi,
Are you overriding the default view of Taxonomy Term which comes with the Taxonomy module. If you are not than you can override that one and then set the No Resullt Behaviour
No I do not use view for Taxonomy term
No, I do not use view for taxonomy term because it crashed Media Gallery layout, but am considering using again Views for Taxonomy Term.
Entering The Dip and trying to win over it.
THEME_preprocess_page
For Drupal 7, the right code is :
Its not working for me. Please advise.
I'm adding this code to my template.php (its tb_methys)
So my template.php file lokks like that:
After saving, i'm receiving an error:
Fatal error: Cannot redeclare tb_methys_preprocess_page() (previously declared in /home/khomusi1/public_html/sites/all/themes/tb_methys/template.php:6) in /home/khomusi1/public_html/sites/all/themes/tb_methys/inc/preprocess_functions.inc on line 51After looking at preprocess.function.inc, it looks like it allready have some overrides.
Please advise what to do.
Thanks apollonet, works like
Thanks apollonet, works like a charm.
Thanks apollonet
Works perfectly
Thanks NexusStar, this looks
Thanks NexusStar, this looks useful. I'm still learning the ropes here, can you specify where this code should be added?
You should put it
You should put it in your template.php file for the active theme you are using and change THEME with the name of the theme
Entering The Dip and trying to win over it.
In What file
In what file do I put this coded, this is for a Drupal 7 site, fall 2017