Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Navigation and Button Issues on Dynamic Page – Starter Site Solution

  • Hi GeneratePress Team,

    I’m currently working on a website using your “Solution” Starter Site:

    1. What I’m trying to achieve:
    When a user clicks on a “Contract Plan” button in the pricing section of the homepage, I want them to be redirected to a page where they can enter billing information and be forwarded to a payment gateway.

    Here’s what should happen:

    1.1. The user is redirected to a custom page:

    1.2. The plan name (e.g., “Plan Growth”) should be displayed automatically on that page based on the ?plan= URL parameter.

    1.3. The selected plan name should also be inserted into a hidden field inside a form so I can know which plan the user selected when they submit it.

    2. Current implementation:
    On the “Contratar Plan” page, I added the following blocks:

    Block 1 – Heading:

    html
    Copiar
    Editar
    <h2 id=”titulo-plan” style=”text-align: center;”>Estás contratando un plan</h2>
    Block 2 – Contact Form 7:
    The form includes a hidden input with id=”input-plan”.

    Block 3 – Script to read the URL parameter:

    html
    Copiar
    Editar
    <script>
    document.addEventListener(“DOMContentLoaded”, function () {
    const urlParams = new URLSearchParams(window.location.search);
    const plan = urlParams.get(‘plan’);

    if (plan) {
    const planNombre = {
    starter: ‘Plan Starter’,
    growth: ‘Plan Growth’,
    business: ‘Plan Business’
    };

    document.getElementById(‘titulo-plan’).innerText = “Estás contratando el ” + (planNombre[plan] || ”);
    document.getElementById(‘input-plan’).value = planNombre[plan];
    }
    });
    </script>
    3. Problems I’m facing:
    3.1 On the “Contratar Plan” page:
    The navigation menu doesn’t work properly on both desktop and mobile. It takes several clicks/taps to trigger a navigation, or it doesn’t work at all.

    3.2 On the homepage:
    When clicking a “Contract Plan” button, the redirect is slow or inconsistent. Sometimes it takes too long to load the target page.

    4. Question:
    Could these issues be caused by my custom JavaScript, by how I’m using blocks, or is there some known compatibility issue with the “Solution” template?

    Any insights or recommendations to solve the navigation and redirect issues would be greatly appreciated.

  • Hi there,

    When clicking a “Contract Plan” button, the redirect is slow or inconsistent. Sometimes it takes too long to load the target page.

    I don’t see the issue, when I click, it redirected me to the page immediately.

  • Hello, thank you. It’s the menus—both mobile and desktop—on the /contratar-plan page; those are the ones that aren’t working.

  • Hi GeneratePress Team,

    Thanks for your time. I just wanted to let you know that I’ve resolved the navigation issue I mentioned earlier. The problem was caused by using anchor links (like #section) in the menu without including the full homepage URL. As a result, those links didn’t work when accessed from other pages.

    Thanks again for your support!

  • Glad you’ve figured it out!

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