• Resolved vanja7

    (@vanja7)


    Good afternoon.

    I am using the Financio theme and I have a problem with the homepage. In the templates of the theme, it says that the homepage template will be used as the homepage regardless of whether the statistical matrix is set. Can you please advise me how I can set the statistical page as the homepage of the site? My site will be bilingual and now when I switch languages my homepage does not change. I am using Polylang for multiple languages.

    If I make changes to the start page, the template is still shown as the start page.

    Thanks in advance for your help.

    Best regards, Ivan

    • This topic was modified 2 years, 3 months ago by vanja7.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support putra1arya

    (@putra1arya)

    Hello @vanja7,
    Try adding this code to your theme function.php. You can find function.php from Tools > Theme File Editor > function.php

    add_action('template_redirect', function() {
        if (is_front_page()) {
    		global $wp_query;
            $page_id = get_option('page_on_front'); // To get page ID you set on Settings > Readings > Homepage
    		// Mimic the query as if it's for the target page
    		$wp_query = new WP_Query(array('page_id' => $page_id));
    		$wp_query->the_post();
    
    		// Capture the template output
    		ob_start();
    		include get_page_template(); // This attempts to include the template for the new page context
    		$output = ob_get_clean();
    
    		// Reset post data after manipulation
    		wp_reset_postdata();
    
    		echo $output;
    		exit;
        }
    });
    • This reply was modified 2 years, 3 months ago by putra1arya.
    Plugin Support gowinda

    (@gowinda)

    Hi,
    It’s been a while since we last heard from you, so we’ll be closing this thread. If you or anyone else encounters the same problem, please create a new thread so it’s easier for us to notice.

    Regards,
    Gutenverse Support

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Homepage change — Financio Theme’ is closed to new replies.