[Resolved] errors possible in header.php and footer.php

Home Forums Support [Resolved] errors possible in header.php and footer.php

Home Forums Support errors possible in header.php and footer.php

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1532763
    xogum-app

    Hi.
    We are having problems optimising this WordPress theme for speed and we went to header.php and footer.php to look for Javascript files, what we found seems odd to us. Can you comment, please?

     <?php
    /**
     * The template for displaying the header.
     *
     * @package GeneratePress
     */
    
    if ( ! defined( 'ABSPATH' ) ) {
    	exit; // Exit if accessed directly.
    }
    
    ?><!DOCTYPE html>
    <html <?php language_attributes(); ?>>
    <head>
    	<meta charset="<?php bloginfo( 'charset' ); ?>">
    	<link rel="profile" href="https://gmpg.org/xfn/11">
    	<?php wp_head(); ?>
    </head>
    
    <body <?php body_class(); ?> <?php generate_do_microdata( 'body' ); ?>>
    	<?php
    	/**
    	 * wp_body_open hook.
    	 *
    	 * @since 2.3
    	 */
    	do_action( 'wp_body_open' ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- core WP hook.
    
    	/**
    	 * 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' );
    	?>
    
    	<div id="page" <?php generate_do_element_classes( 'page' ); ?>>
    		<?php
    		/**
    		 * generate_inside_site_container hook.
    		 *
    		 * @since 2.4
    		 */
    		do_action( 'generate_inside_site_container' );
    		?>
    		<div id="content" class="site-content">
    			<?php
    			/**
    			 * generate_inside_container hook.
    			 *
    			 * @since 0.1
    			 */
    			do_action( 'generate_inside_container' );
    

    AND

    <?php
    /**
     * The template for displaying the footer.
     *
     * @package GeneratePress
     */
    
    if ( ! defined( 'ABSPATH' ) ) {
    	exit; // Exit if accessed directly.
    }
    ?>
    
    	</div>
    </div>
    
    <?php
    /**
     * generate_before_footer hook.
     *
     * @since 0.1
     */
    do_action( 'generate_before_footer' );
    ?>
    
    <div <?php generate_do_element_classes( 'footer' ); ?>>
    	<?php
    	/**
    	 * generate_before_footer_content hook.
    	 *
    	 * @since 0.1
    	 */
    	do_action( 'generate_before_footer_content' );
    
    	/**
    	 * generate_footer hook.
    	 *
    	 * @since 1.3.42
    	 *
    	 * @hooked generate_construct_footer_widgets - 5
    	 * @hooked generate_construct_footer - 10
    	 */
    	do_action( 'generate_footer' );
    
    	/**
    	 * generate_after_footer_content hook.
    	 *
    	 * @since 0.1
    	 */
    	do_action( 'generate_after_footer_content' );
    	?>
    </div>
    
    <?php
    /**
     * generate_after_footer hook.
     *
     * @since 2.1
     */
    do_action( 'generate_after_footer' );
    
    wp_footer();
    ?>
    
    </body>
    </html>
    

    PS.- This theme was downloaded from your website.

    #1532795
    Leo
    Staff
    Customer Support

    Hi there,

    we went to header.php and footer.php to look for Javascript files

    The theme itself does not use Javascript.

    what we found seems odd to us.

    What do you mean by it seems odd?

    #1532832
    xogum-app

    Apologies, Mr Leo.

    We had a problem with an experimental plugin that corrupted your (previously uploaded) theme. That code that we posted here is the new upload and we’ve been comparing snapshots and it looks different for sure. We just double-checked with PHP Syntax testers and it looks good!

    We know that your theme doesn’t have Javascript but we don’t leave any stone unturned regarding speed.

    We noticed another problem, may be related to links but only came up 2 days ago with your theme. Do you care to visit once more https://xogum.app/wordpress-blog/ and press on the post “Weblog Original Blog”, you will see very simply a page refresh with a new link: xogum.app/weblog-original-blog/ and you cannot read the post.

    We have tried your button, too, for no avail.

    Kind regards.

    #1533669
    Leo
    Staff
    Customer Support

    We had a problem with an experimental plugin that corrupted your (previously uploaded) theme. That code that we posted here is the new upload and we’ve been comparing snapshots and it looks different for sure. We just double-checked with PHP Syntax testers and it looks good!

    Please make sure that your header.php and footer.php is the same as here:
    https://github.com/tomusborne/generatepress/blob/master/header.php
    https://github.com/tomusborne/generatepress/blob/master/footer.php

    We noticed another problem, may be related to links but only came up 2 days ago with your theme. Do you care to visit once more https://xogum.app/wordpress-blog/ and press on the post “Weblog Original Blog”, you will see very simply a page refresh with a new link: xogum.app/weblog-original-blog/ and you cannot read the post.

    Can you open a new topic for the separate question?

    Thanks 🙂

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