ColorlibHQ / illdy

Illdy is a free one page WordPress business theme with a minimal design
GNU General Public License v3.0
44 stars 38 forks source link

Front Page section titles not displaying #278

Closed ztackett11 closed 6 years ago

ztackett11 commented 6 years ago

The titles for any of the front page sections are not being displayed. They are only displayed and viewable when I am logged in as admin and preview/view the page. Otherwise they are not showing up.

ztackett11 commented 6 years ago

Since no one has updated or commented on this issue in a few days. The problem seems to be coming from each individual front-page sections code, in this example, for the About front-page sections front-page-about.php (sections/front-page-about.php)

The code at the top of the file:

if ( current_user_can( 'edit_theme_options' ) ) {
    $services_general_title = get_theme_mod( 'illdy_services_general_title', __( 'Services', 'illdy' ) );
    $services_general_entry = get_theme_mod( 'illdy_services_general_entry', __( 'In order to help you grow your business, our carefully selected experts can advise you in in the following areas:', 'illdy' ) );
} else {
        // believed problem with below line. The titles for the front page sections are not being set correctly
    $services_general_title = get_theme_mod( 'illdy_services_general_title' );
    $services_general_entry = get_theme_mod( 'illdy_services_general_entry' );
}

When changed to something more logical, ie.

// if ( current_user_can( 'edit_theme_options' ) ) {
//  $general_title = get_theme_mod( 'illdy_about_general_title', __( 'About', 'illdy' ) );
//  $general_entry = get_theme_mod( 'illdy_about_general_entry' );
// }

Then the more logical, this seems to have fixed the problem for now.

$general_title = get_theme_mod( 'illdy_about_general_title', __( 'About', 'illdy' ) );
$general_entry = get_theme_mod( 'illdy_about_general_entry' );

The underlying problem appears to be that the modified theme title for any section is not being displayed because of either the conditional, or that the variable name for the illdy_front-page-section_general_title is incorrect.

I have not been able to test this theory out myself however.

cristianraiber commented 6 years ago

@ztackett11 - do you have the Illdy Companion plugin & activated? Did you do the demo content import from Illdy Companion as well?

ztackett11 commented 6 years ago

Yes it is installed.

cristianraiber commented 6 years ago

Demo content also imported? :) Because the error you're reporting can only happen IF you haven't installed the demo content. That's because, initially, Illdy had defaults but the w.org mods had us change them to what you see today.

They basically didn't approve of the fact that users without admin access would see defaults set in their name, without an action on their part. That's why you're seeing those defaults in the back-end and not in the front-end.

This is not an actual bug BTW.