text that can only appear on the first page

  • Hi, I have a small problem. On some label pages, I’ve used the GeneratePress elements function to create a container with text inside. How can I make the label page text only appear on the first page and not on subsequent pages? I’ve tried several CSS codes, and some work on the mobile version, but none on the desktop version.

    Example:
    The text MUST appear here:
    https://avecesveoviajes.com/tag/pueblos

    The text MUST NOT appear here:
    https://avecesveoviajes.com/tag/pueblos/page/2

    thanks

  • Hello,

    Try adding this CSS:

    .archive.paged.tag .gb-element-f4061466 {
        display: none;
    }
  • Okay. It works on the mobile version, but not on the desktop version.

  • Hi,

    The CSS is not screen specific, it should work everywhere. I am not currently seeing it being applied on the page, though.

  • That’s right. What’s the solution?

  • Hi,

    Please, go to Appearance -> Customize -> Additional CSS and enter the CSS I provided:

    .archive.paged.tag .gb-element-f4061466 {
        display: none;
    }
  • That’s what I did when he told me. But it doesn’t work… It only works on mobile, not on the desktop version.

  • Hi there,

    The CSS in your Customizer > Additional CSS section has a syntax issue. Please remove the existing CSS and replace it with the corrected version below:

    .secondary-navigation .menu-toggle {
        display: none;
    }
    @media (max-width: 768px) {
        .secondary-navigation {
            text-align: center !important;
        }
        .secondary-navigation ul {
            display: block;
        }
        .secondary-navigation .sf-menu > li {
            float: none;
            display: inline-block !important;
        }
        .post-image img {
            width: 100% !important;
            height: auto;
            -o-object-fit: cover;
            object-fit: cover;
        }
    }
    .archive.paged.tag .gb-element-f4061466 {
        display: none;
    }
  • Hi, it’s still not working on the desktop version. It does work on the mobile version.
    EDIT: Okay, okay. I removed another CSS code from the customizer and now it works. Perhaps one of the codes was causing the problem.

  • You need to remove all the existing CSS before replacing it with the fixed version I provided.

    It looks like you added the new CSS without removing the existing CSS, which is why it’s still not working.

  • Okay, perfect technical support as always. Thank you very much, best regards.

  • No problem, glad to hear that!

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.