[Resolved] Product title above product image on mobile

Home Forums Support [Resolved] Product title above product image on mobile

Home Forums Support Product title above product image on mobile

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #968000
    Deniz Akay

    Hi,

    I want to move product title on single product pages above product image on mobile view only.

    Thanks!

    #968207
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    I wonder if something like this would do it:

    1. Create a Hook Element: https://docs.generatepress.com/article/hooks-element-overview/
    2. Set the hook to before_content
    3. Check the “Execute PHP” checkbox
    4. Add this as your hook content:

    <div class="mobile-product-title hide-on-desktop hide-on-tablet">
        <h1><?php the_title(); ?></h1>
    </div>

    5. Set your Display Rules to your single products.

    Then add this CSS:

    @media (max-width: 768px) {
        .product_title {
            display: none;
        }
    }

    Let me know if that does the trick or not ๐Ÿ™‚

    #968342
    Deniz Akay

    Yes it works but if I do that I don’t have h1 tag on single products pages anymore. On my google webmaster tools page “mobile indexing first” setting is on, so it’s important to have h1 tag on mobile version of my web site.

    If I change your code to this:

    <div class="mobile-product-title hide-on-desktop hide-on-tablet">
        <h1><?php the_title(); ?></h1>
    </div>

    Is it bad for SEO? Will google bots see double h1 tags on my site?

    #968520
    Tom
    Lead Developer
    Lead Developer

    Ah sorry, forgot the H1.

    No, I don’t believe it will be bad for SEO, as the titles are the same and one is hidden. However, you may want to do some research on that, as I’m not 100% sure.

    #968814
    Deniz Akay

    Thank you!

    #968941
    Tom
    Lead Developer
    Lead Developer

    No problem ๐Ÿ™‚

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