Broken site after Customizr theme update: how to fix it

If your site uses the Customizr theme, and in an earlier version of it you changed the number of featured pages, as described in our tutorial “Featured pages in Customizr – how to change their number and disposition“, chances are that after a theme update your site gets broken. No need to panic, it should take about 5 minutes to fix it.

In a nutshell, it amounts in overwriting the files we changed in the child theme, with their corresponding updated files in the main theme, and afterwards applying our customizations once again.

So here is, in detail, how to repair a broken site after Customizr theme update – if you changed the number of featured pages:
How to fix broken site after Customizr theme update

Step 1. – Replace the necessary files in the child theme

Copy the following files, from the main theme to the child theme, overwriting the existing ones:

wp-content/themes/customizr/inc/class-fire-init.php -> wp-content/themes/customizr-child/inc/class-fire-init.php

wp-content/themes/customizr/inc/class-fire-utils_settings_map.php -> wp-content/themes/customizr-child/inc/class-fire-utils_settings_map.php

wp-content/themes/customizr/inc/parts/class-content-featured-pages.php -> wp-content/themes/customizr-child/inc/parts/class-content-featured-pages.php

Step 2. – Change the number of featured pages

In the file wp-content/themes/customizr-child/inc/class-fire-init.php, search the string $this -> fp_ids             = array( ‘one’ , ‘two’ , ‘three’ ); (it should be about the line #189) and add to the list as many elements as your desired featured pages.

Suppose you want to display 4 instead of 3 pages, that line should be changed to: $this -> fp_ids             = array( ‘one’ , ‘two’ , ‘three’, ‘four’ );

If you need 6 featured pages, then you should change it to: $this -> fp_ids = array( ‘one’ , ‘two’ , ‘three’ , ‘four’, ‘five’, ‘six’ );

Step 3. – Set the number of featured pages per row

In the file wp-content/themes/customizr-child/inc/parts/class-content-featured-pages.php, locate the function tc_fp_block_display() and look for a line that looks like this: $fp_per_row = apply_filters( ‘tc_fp_per_line’, 3 ); (it should be the line #76 or thereabout). Change it to reflect the desired number of featured pages per row.

Supposing you need 4 featured pages, all displayed on the same row, you should change the line to: $fp_per_row = apply_filters( ‘tc_fp_per_line’, ;, 4 );.

For 6 featured pages, displayed on two rows, the line should remain unchanged, reading: $fp_per_row = apply_filters( ‘tc_fp_per_line’, 3 );.

Step 4. – Update the options panel

In the file wp-content/themes/customizr-child/inc/class-fire-utils_settings_map.php, locate the function tc_generates_featured_pages( $_original_map ) (about line #2489) and, for each featured page, add a line in the dropdown array and another one in the text array, as shown in our post “Featured pages in Customizr – how to change their number and disposition“.

If you got a broken site after Customizr theme update, even if you had not modified the number of featured pages, we invite you to leave a comment or send us an email describing your context and we’ll be happy to assist you to fix your site.

 

Plumber round cartoon logo | Free vector by Vector Open Stock

Leave a Comment

Sitemap

open