Content on the whole page except in the entries

xavipaco
Newcomer Level 1
Posts
1
Like
0
Since
2020
Automatically translated from Spanish
Author #1

Hello, good day. I wanted to know how I could make some content appear on all pages except on blog posts. I want to put an ad in the header of my page but I don't want it to be seen on the posts.

Automatically translated from Spanish

1 replies

  1. Julio Rodríguez
    • SEO & GEO
    • CMS & No-code
    • Hosting & Servers
    • Web Development
    • Off-topic
    Regular Level 8
    Posts
    93
    Like
    0
    Since
    2026
    Automatically translated from Spanish

    To be able to add it, you simply need to put the code between an !is_single.

    <?php if(!is_single()) { ?>HTML

    Or in the form where everything is in php

    <?php if(!is_single()) { echo '<a href=""><img src="">'; } ?>

    Automatically translated from Spanish

Sign in to take part in the forum.

This reply will be hidden. It is kept and can be restored.

Reason
or with your email