[Support request] Header code PHP for AMP Theme

Home Forums Support [Support request] Header code PHP for AMP Theme

Home Forums Support Header code PHP for AMP Theme

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #836861
    Kevin

    I’m using the AMP Plugin and I’m using paried mode to turn the generatepress theme into an AMP-compatible theme. It’s all right, but I need to remove the navbar from the duplicate theme without affecting Page Headers.

    I created a directory within the child theme called AMP and pasted the single.php from generatepress and I’m trying to edit and remove the bugged things that stay in the AMP via mode paried.

    I can not remove NAVBAR without destroying the theme. I know it stays in the following code:

    <? php
    / **
    * generate_before_header hook.
    *
    * @since 0.1
    *
    * @hooked generate_do_skip_to_content_link – 2
    * @hooked generate_top_bar – 5
    * @hooked generate_add_navigation_before_header – 5
    * /
    do_action (‘generate_before_header’);

    / **
    * generate_header hook.
    *
    * @since 1.3.42
    *
    * @hooked generate_construct_header – 10
    * /
    do_action (‘generate_header’);

    / **
    * generate_after_header hook.
    *
    * @since 0.1
    *
    * @hooked generate_featured_page_header – 10
    * /
    do_action (‘generate_after_header’);
    ?>

    But I do not know how to proceed or create an alternative that pulls all data from the header except the 2 at the top NAVBAR.

    I am using PageHeaders to display the highlighted image of the post. it buga if I remove the second code, and if I remove only the first continues having a navbar at the top of the site.

    #837139
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Are you only trying to remove the site navigation?

    If so, you could try this CSS:

    html[amp] #site-navigation {
        display: none;
    }

    Let me know 🙂

    #837140
    Kevin

    I am facing a lot of errors using the theme layout paried mode … I gave up and went back to the other AMP plugin, but I wanted to keep the CSS code equal to the generatepress theme …

    I recommend you to think about developing native support for AMP pro Generatepress, without the need for plugins and coolies of the type.

    #837150
    Tom
    Lead Developer
    Lead Developer

    We’ll be developing a plugin which integrates GP with the official AMP plugin very soon.

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