• Purchasing a license grants permission to use the software and to get Tech Support. A license purchase doesn't grant customization support.

Update Header

Barry

Network license
License owner
Perhaps I am missing something, but how to I add a new "category" to the default list in Chevereto



How do I add something else, such as "blog"
 

Oakley

Network license
Beta tester
You say "Category" ?? but if you just need an extra menu item after random then.....

Create a copy of the theme, and then edit header.php and put it in:

app ==> themes ==> yourtheme ==> overrides

Find:

Code:
            <?php if(CHV\getSetting('website_random')) { ?>
            <li id="top-bar-random"  data-nav="random" class="top-btn-el phone-hide">
                <a href="<?php echo G\get_base_url("?random"); ?>"><span class="top-btn-text"><span class="icon icon-shuffle"></span><span class="btn-text phone-hide phablet-hide"><?php _se('Random'); ?></span></span></a>
            </li>
            <?php } ?>
Add after:

Code:
            <?php { ?>
            <li class="top-btn-el">
                <a href="http://www.myblog.com"><span class="top-btn-text"><span class="icon icon-home"></span><span class="btn-text phone-hide phablet-hide"><?php _se('Blog'); ?></span></span></a>
            </li>
            <?php } ?>

Think that should work.

You might need to change the icon to something you like. In that code it's "icon-home", not sure if there is a icon-blog you'd need to check. You'll also need to amend the url for your blog site.

You also might need to make your logo smaller as it could "crash" into the extra button ;)
 

Barry

Network license
License owner
@Oakley Thanks - I will test this later today. I didnt really mean category, I meant an extra menu item just like you described.

I appreciate you sharing the code snippet.
 

Craig

Core license
License owner
Hello,

I am trying to add a new menu item and was a little confused about what you wrote above. Sorry coding rookie here.

So I create a copy of header.php and paste in overrides? Then insert the code you wrote above with the link to my blog?

Any help would be appreciated.

Thanks.
 

Phil Boyd

Core license
License owner
@Oakley , THANK YOU! I've been trying to figure this out since I set this up. I kept just trying to stick HTML code in with no luck.
 

Craig

Core license
License owner
@Oakley could you please be a little more specific as to how to add a link on the top button to a blog I would like to include.

Thanks!
 

kietnguyen150694

Core license
License owner
You say "Category" ?? but if you just need an extra menu item after random then.....

Create a copy of the theme, and then edit header.php and put it in:

app ==> themes ==> yourtheme ==> overrides

Find:

Code:
            <?php if(CHV\getSetting('website_random')) { ?>
            <li id="top-bar-random"  data-nav="random" class="top-btn-el phone-hide">
                <a href="<?php echo G\get_base_url("?random"); ?>"><span class="top-btn-text"><span class="icon icon-shuffle"></span><span class="btn-text phone-hide phablet-hide"><?php _se('Random'); ?></span></span></a>
            </li>
            <?php } ?>
Add after:

Code:
            <?php { ?>
            <li class="top-btn-el">
                <a href="http://www.myblog.com"><span class="top-btn-text"><span class="icon icon-home"></span><span class="btn-text phone-hide phablet-hide"><?php _se('Blog'); ?></span></span></a>
            </li>
            <?php } ?>

Think that should work.

You might need to change the icon to something you like. In that code it's "icon-home", not sure if there is a icon-blog you'd need to check. You'll also need to amend the url for your blog site.

You also might need to make your logo smaller as it could "crash" into the extra button ;)
thank you so much
 
Top