[Support request] Is there any new update for amp page ?

Home Forums Support [Support request] Is there any new update for amp page ?

Home Forums Support Is there any new update for amp page ?

  • This topic has 3 replies, 2 voices, and was last updated 3 years ago by David.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1679782
    Budi

    Hi,

    I am still having menu problem with amp page.
    Is there any update ?
    Thanks.

    #1680554
    David
    Staff
    Customer Support

    Hi there,

    if you’re referring to your older topic related to the Secondary nav, then no – not yet, we’re currently in the process of updating GPP Premium some of which will assist with making the necessary updates required in the GP AMP plugin.

    #1681241
    Budi

    How do I add search function in primary menu for amp page ?
    Something like below

    <form role=”search” method=”get” class=”search-form” action=”https://xxxxx/”&gt; <label for=”search-form-1″> <span class=”screen-reader-text”>Search</span> </label> <input type=”search” id=”search-form-1″ class=”search-field” placeholder=”Search” value=”” name=”s” /> <button type=”submit” class=”search-submit”><svg class=”icon icon-search” aria-hidden=”true” role=”img”> <use href=”#icon-search” xlink:href=”#icon-search”></use> </svg><span class=”screen-reader-text”>Search</span></button></form>

    #1681535
    David
    Staff
    Customer Support

    You can use a Hook Element to add the HTML to your site.

    1. Create a new Hook Element:
    https://docs.generatepress.com/article/hooks-element-overview/

    2. Add this as your hook content:

    <?php
    if (function_exists( 'is_amp_endpoint' ) && is_amp_endpoint()) {
        ?>
        // Add your HTML or Shortcode here
        <?php
    }
    ?>

    3. Select the menu_bar_items hook
    4. Check Execute PHP ( and check Execute Shortcodes if you’re using them )
    4. Set the Display Rules to the Entire Site.

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