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.

Code snippets not working on mobile

  • I have several snippets ie, remove logo link remove header link remove author link. These are codes taken from gp support. They work fine on desktop. But not on mobile. I’ve cleared all caches checked everything I can’t understand how the snippets don’t work on mobile. I have the same set up both for desktop and mobile. Could you please help. My site is https://sentientmetaphysics.com/

  • Hi there,

    what snippets did you add that are not working ?

  • Several snippets and they work fine on desktop. The problem has been there for a long time. U really want me to list them ok. For all these snippets not work on mobile surely it can’t be the code GP wrote them.

    not working on mobile: remove author link
    add_filter( ‘generate_post_author_output’, function() {
    printf( ‘ <span class=”byline”>%1$s</span>’,
    sprintf( ‘<span class=”author vcard” itemtype=”http://schema.org/Person&#8221; itemscope=”itemscope” itemprop=”author”>%1$s <span class=”fn n author-name” itemprop=”name”>%4$s</span></span>’,
    __( ‘by’,’generatepress’),
    esc_url( get_author_posts_url( get_the_author_meta( ‘ID’ ) ) ),
    esc_attr( sprintf( __( ‘View all posts by %s’, ‘generatepress’ ),
    get_the_author() ) ),
    esc_html( get_the_author() )
    )
    );
    } );
    not working on mobile: Cat description page one only
    add_action( ‘wp’, ‘tu_remove_paged_category_description’ );
    function tu_remove_paged_category_description() {
    $page = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1;
    if ( 1 !== $page ) {
    remove_action( ‘generate_archive_title’, ‘generate_archive_title’ );
    add_action( ‘generate_archive_title’, ‘tu_custom_paged_archive_title’ );
    }
    }

    function tu_custom_paged_archive_title() {
    ?>
    <header class=”page-header”>
    <h1 class=”page-title”>
    <?php the_archive_title(); ?>
    </h1>
    </header>
    <?php
    }
    not working on mobile: remove title link
    add_filter( ‘generate_site_title_output’, function( $output ) {
    return sprintf(
    ‘<%1$s class=”main-title” %3$s>
    %2$s
    </%1$s>’,
    ( is_front_page() && is_home() ) ? ‘h1’ : ‘p’,
    get_bloginfo( ‘name’ ),
    ‘microdata’ === generate_get_schema_type() ? ‘ itemprop=”headline”‘ : ”
    );
    });
    not working on mobile: remove logo link
    add_filter( ‘generate_logo_output’, ‘tu_no_logo_link’, 10, 3 );
    function tu_no_logo_link( $output, $logo_url, $html_attr ) {
    printf(
    ‘<div class=”site-logo”>

    </div>’,
    $html_attr
    );
    }

  • Let’s check the codes one by one.

    For the 1st code to remove author link, where can I see an author link? I checked the posts, no author name is shown.

    For the 2nd code Cat description page one only, can you link me to a category archive that’s more than 2 pages?

    For the codes to remove link for main title and logo, it does not work on mobile.

    Can you provide an admin login for us to check the backend?

  • Your right author link is not there because if I put the author there it shows the link on mobile. Which is very bad as it’s a repeat of the blog. Being the only author.

    2nd code. Cat description on page one only is working fine. Not on mobile. On any page at all. So I’m not linking you to every cat page on my site.

    For the code remove title link and logo. Are you saying you can’t remove the links on mobile. I don’t understand.

    As for checking the backend yeah sure. But I’ve never done this before and don’t know how to set temporary sign in. So I will have to spend an hour or two researching to find out how.

  • For the code remove title link and logo. Are you saying you can’t remove the links on mobile. I don’t understand.

    The code should’ve worked for mobile as well, I do not understand why it does not work on mobile.

    That’s why I would like to check if the code is added under certain conditions.

  • Ok I’m finding temporary login confusing. Asking me to download plugins etc. To do it without one or with one I’ll need your email address.

  • You can make up an email address, WP does not check that.

  • Ok have sent the info

  • info won’t send confusing again. It’s in the private info box can you see it?

  • Checking in with wordpress support they are saying there is a conflict between GP and WP. When I use the customiser my site monitoring shows a php error. When I change things it shows on the customiser but not on the front end. Plus when I try to save changes in the customiser it shows an error cannot save. According to wp this is the conflict.

  • Unfortunately that login does not work as the email provided does not exist as a wp.com login.
    I am not sure how WP.com allows for 3rd party access to your site.

    However, I checked your site on desktop and mobile.

    And I see no difference between the two sites.
    For example I see the Description on the Category pages, and the Title Link is missing from the home page.

    Check if there is any page caching or CDN attached to the site.
    If there is purge the caches and the CDN.

  • Now I asked for a proper email from support I was told to make one up. Check comments above! I strongly disagree with you on my mobile and many others including different browsers they don’t work. No CDN No Cache.

  • The code for the categories is to remove the description from all pages except page one works on desktop NOT mobile. Please the comments!!!

  • Hi there,

    There is no login attached to the Private Information section. Could you please resend that again? Also, please do not check the ‘Mark this topic as resolved’ box when you click submit, as it will erase all the information placed inside the private information section.

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