Hi
can anybody shed some light on how to hide the category title. I am currently using joomla v.9.1 an virtuemart 3.6.10. My website is not live yet. For the life of me I cannot find where to hide the title.
can anybody help? Just in case I have confused myself, i have attached an image of what I would like to remove.
much appreciated
It looks like the h1 caption from the menu and not the category caption.
I adjust it by setting the menu item or using the override in the template:
templates / OUR_TEMPLATE / html / com_virtuemart / category / default.php
either remove it in an over ridden template file or hide it by css
over ride then remove
components\com_virtuemart\views\category\tmpl\default.php
<?php if (!empty($this->category->category_name)) { ?>
<h1><?php echo vmText::_($this->category->category_name); ?></h1>
<?php } ?>
or hide
.browse-view h1 {
display:none;
}
Thank you for the quick response. Trust me to get it wrong :)
will give both bash
tks
:(sadly the easy menu option did not work
I'm sorry, but I don't have enough information from you to continue.
It will definitely help
- attach a code listing using the Inspect Element
- attach the settings of the Preventions Pack menu item
- list files in your template / html / com_virtuemart / category folder if any
Thank you for spending time on this. You kinda lost me on the last request... :) but attached is what I understood
Im not lost :)
You didn't do what I or GJC wrote.
- no override is created in the template for the default file and there is no commented line for H1 (as I wrote or GJC)
- I do not see the checked setup of the menu in your pdf - TAB Page Display item
In addition, I see on pdf hidden important information - you are using the HELIX framework and as you can see on the menu item it uses its own TAB to set the Helix Page Title
1. Create an override according to the rules of creating a Joomla override view:
https://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core
and create it for the file
components \ com_virtuemart \ views \ category \ tmpl \ default.php
-> place in a folder
templates / OUR_TEMPLATE / html / com_virtuemart / category / default.php
NOT IMPLEMENTED
2. Edit the line in the code and comment out the H1 view in the category view default template
(as I sent in the attachment)
NOT IMPLEMENTED
avoid displaying H1 title, but you will have bad SEO (every page must have H1) But that was not your request.
3. Check the menu item and TAB Helix Page Title settings (I don't know setup for this TAB).
Quoteattach a code listing using the Inspect Element
The H1 is calling from category template Default.
There is nothing for setup from VM admin configuration.
Only
if (!empty($this->products)) { // if exist any products in this category
?>
<div class="orderby-displaynumber">
<div class="pull-left vm-order-list">
<?php echo $this->orderByList['orderby']; ?>
<?php //echo $this->orderByList['manufacturer']; ?>
</div>
<div class="pull-right display-number"><span class="hidden-sm hidden-xs"><?php echo $this->vmPagination->getResultsCounter ();?></span><?php // echo $this->vmPagination->getLimitBox ($this->category->limit_list_step); ?></div>
<div class="clearfix"></div>
</div> <!-- end of orderby-displaynumber -->
<?php // Then show Category name as H1 ?>
<h1><?php echo vmText::_($this->category->category_name); ?></h1>
<?php } ?>
You must comment this line as I wrote or send in attachment
confety, you should not remove the H1 if you have not another one in this page because SEO.
Better add some css if it's too big.
patrick:
Quoteconfety, you should not remove the H1 if you have not another one in this page because SEO.
Thank you Patrick, you're right, just as I wrote before.
If you remove H1, you will create bad SEO for this site. For proper SEO, you can use several ways.
Ffor example, instead of the name of the category, which you can hide with php or css, you can make the name of the menu item visible.
Or you can use a module to display your own name (for example, from Joomlart - MassHead Module or from MiniJoomla - VM Category Title Module.)
I think there would be other options, depending on why you want to hide the category name.
Hi Guys, thank you both for the detailed help and steps.
I did do some if them and then undid.it when I thought it did not work. But I clearly did not.read it properly. Sorry about that.
So if I understand correctly. If I hide the h1, it will affect my so. Perhaps then I should just make it a lot smaller an I did not like the position, it would have been better if it was above the description
Once again a big thank you
So yes - just move it above description and change size using CSS
<h1><?php echo vmText::_($this->category->category_name); ?></h1>
You should be able to target specifically the category description <h1> in css so that all other pages are unchanged