Website Styling issue

Hi there,

I hope this email finds you well.

I am facing the styling issue after update the latest version of the Themeco x theme.

Can you please help me out with this issue as soon as possible?

Looking forward to your reply.

Thank you.

Hi Peter,

Thank you for writing in, which site is you’re having the issue with? Please provide us login credentials on a secure note so we can take a closer look.

In the meantime, if you’re using X, please make sure both X and Cornerstone are on the latest version (refer here)

Also, remember to clear all your caching features (plugin, server-side, CDN, and browser’s cache) after updating so that the code from the latest release is always in use. This will help you to avoid any potential errors.

Cheers!

Hi there,
Thank you for your reply.
I have changed the active theme from child X theme to main X theme then it’s showing perfectly fine now.
Here are the websites links below where I have faced this issues:



Can you please let me know what is the actual issue with the child theme?
If you need logins then let me know I will provide this.
Looking forward to your reply.
Thank you.

Hello @peterguirguisccsb,

Thanks for the updates.

There could be some PHP code or template modifications in your child theme that is causing the issue. We would love to check the child theme files if we are able to access the site.

I also have inspected your site and it seems that you are just having some caching issues. Please clear your plugin cache since you have installed the SiteGround Optimizer plugin. And I also noticed that you are using Cloudflare. Please login to your Cloudflare account and purge your site cache to make sure that the files from the latest updates will be cache and server by Cloudflare and not the old cached files.

If the suggestion above does not help, please give us access to your site so we can check your site settings. You can create a secure note in your next reply with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role
- Confirmation that we can access and make changes to your site

To know how to create a secure note, please check this out: How The Forum Works

Best Regards.

Hi there,

I hope this email finds you well.

I am done all of these changes that you have mentioned in the previous email and have cleared the cache as well.

Please find the login credentials to the security note section. Please make sure these logins is for the live site.

Please let me know once you will fix the issue.

Looking forward to your reply.

Thank you.

Hello @peterguirguisccsb,

You are having the styling issue because of your child theme’s functions.php file. The file does not contain the correct code. You should be having this default content:

<?php

// =============================================================================
// FUNCTIONS.PHP
// -----------------------------------------------------------------------------
// Overwrite or add your own custom functions to X in this file.
// =============================================================================

// =============================================================================
// TABLE OF CONTENTS
// -----------------------------------------------------------------------------
//   01. Enqueue Parent Stylesheet
//   02. Additional Functions
// =============================================================================

// Enqueue Parent Stylesheet
// =============================================================================

add_filter( 'x_enqueue_parent_stylesheet', '__return_true' );



// Additional Functions
// =============================================================================

You may add your additional custom PHP code below the Additional Functions therefore it should be like this:

<?php

// =============================================================================
// FUNCTIONS.PHP
// -----------------------------------------------------------------------------
// Overwrite or add your own custom functions to X in this file.
// =============================================================================

// =============================================================================
// TABLE OF CONTENTS
// -----------------------------------------------------------------------------
//   01. Enqueue Parent Stylesheet
//   02. Additional Functions
// =============================================================================

// Enqueue Parent Stylesheet
// =============================================================================

add_filter( 'x_enqueue_parent_stylesheet', '__return_true' );



// Additional Functions
// =============================================================================

add_action( 'init', 'stop_heartbeat', 1 );
function stop_heartbeat() {
	wp_deregister_script('heartbeat');
}

// =============================================================================

If you noticed in the example code, your enqueue function was removed because it is incorrect.

Please note that the code provided above serves as a guide only and is to help you in resolving your child theme issue so implementing it and maintaining the code will be out of our support scope and for further maintenance for new possible versions of the theme that may cause the customization to break, you will need to hire a developer.

If you are unfamiliar with code and resolving potential conflicts, you may select our One service for further assistance.

Hope this helps.

Hi there,

Thank you for your reply.

I have checked the function.php file of the X child theme and there is en queue code over there.

Can you please confirm this code is working or not?

Looking forward to your reply.

Thank you.

Hi @peterguirguisccsb,

I have checked the functions.php of your child theme the code is written is correct. But you don’t need to write the code for enqueueing the Parent Theme style. The example shown by my colleague is the correct way to do that. The rest of the code is correct to de-register the script.

Thanks

Hi there,
Thank you for your reply.
Okay, I have checked the parent theme and there is no code for enqueueing. This enqueueing code is only in the child theme now.
Thank you.

Hello @peterguirguisccsb,

Can you please confirm that you are still having the issue with styling? The code written into the functions.php of your active child theme should not affect the style of the website.

Thanks

Hi there,

Thank you for your reply.

Yes, I am facing the same problem when I activated the child theme. I have activated the themeco X parent theme for now. There is an issue with some pages to the navigation bar on mobile devices.

Actually, there is extra spacing to the top of the navigation bar. Here are the links below where I am facing the issue.

Please have a look and let me know what is the actual issue with the navigation bar.

Looking forward to your reply.

Thank you.

Hi Peter,

I’ve checked the child theme on electionforum.org and I did not see this line on the child theme’s functions.php file

add_filter( 'x_enqueue_parent_stylesheet', '__return_true' );

That is the most important line on the child theme.

To make sure you have a clean child theme, please re-download and re-install the child theme. You can download a clean x-child theme here.

I see you have this custom file on your child theme
framework/legacy/cranium/headers/views/global/_nav-primary.php

You might need to recopy a new _nav-primary.php file from the parent X theme and remodify it if needed.

On your child theme’s functions.php file, you have this 2 block of function.

add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' );
function enqueue_parent_styles() {
   wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
}
add_action( 'init', 'stop_heartbeat', 1 );
function stop_heartbeat() {
wp_deregister_script('heartbeat');
}

You can discard the first block, and add only the second block to your new child theme functions.php file.

Remember to clear all your caching features (plugin, server-side, CDN, and browser’s cache) after updating so that the code from the latest release is always in use. This will help you to avoid any potential errors.

Let us know how it goes,
Cheers!

Hi there,

Thank you for your reply.

Okay, I will reinstall the child X theme to the website. Can you please let me know should I add this code to the function.php manually or will be fix the issue after reinstall the child theme to the website?

Looking forward to your reply.

Thank you.

Hi Peter,

When you reinstall the child theme, it should restore all the behaviour of the theme to default and fixed the issues.

However, please keep in mind that whatever customization you did on the _nav-primary.php will be lost. All behaviour of the header will be back to its default behaviour.

I did saw that file (_nav-primary.php) on your child theme, but I have not look deeper into what is inside of that.

If you notice that the behaviour of your navigation is different after reinstalling the child theme, then you know that there is customization on the _nav-primary.php that needs to be put back.

When you put back that file (_nav-primary.php) and it still has an issue, then you know that you need to modify that custom file to adhere to the update.

If you are unfamiliar with code and resolving potential conflicts, you may opt-in on our ONE service for further assistance.

Hope it helps,
Cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.