• Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space
  • Chevereto Support CLST

    Support response

    Support checklist

    • Got a Something went wrong message? Read this guide and provide the actual error. Do not skip this.
    • Confirm that the server meets the System Requirements
    • Check for any available Hotfix - your issue could be already reported/fixed
    • Read documentation - It will be required to Debug and understand Errors for a faster support response

Banner Code in Header

dotch

Chevereto Member
I would like to place pop-up code into the header (if possible before the </head> tag and only in viewer pages).

Right now there only seems to be a field for "Inside viewer foot (image page)".
 
app/themes/Peafowl/custom_hooks

Check the readme file and add your code in a file called header.php
 
I renamed the header.sample.php into header.php and added the code like this:

Code:
<?php
if(!defined('access') or !access) die('This file cannot be directly accessed.');
/* Add here your custom header code */
<!-- my code -->
<script type="text/javascript">
...
...
etc.
</script>
<!-- my code -->
?>

But my Chevereto site becomes completely white. Do I do something wrong?

Thanks for any help.
 
PHP:
<?php if(!defined('access') or !access) die('This file cannot be directly accessed.'); ?>
/* Add here your custom header code */
<!-- my code -->
<script type="text/javascript">
...
...
etc.
</script>
<!-- my code -->
 
Sure works. But it's just below the </head> tag and not in between the <head></head> tags.

To be more precise the code btw is:

PHP:
<?php if(!defined('access') or !access) die('This file cannot be directly accessed.'); ?>
<!-- my code -->
<script type="text/javascript">
...
...
etc.
</script>
<!-- my code -->

So I removed

Code:
/* Add here your custom header code */

Otherwise it is shown.
 
Last edited:
...

That is code inside a PHP tag so is PHP code, not HTML code. HTML code must be placed outside PHP tags.
 
Back
Top