This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

Use a page entry as footer and header in page

8 years ago

I am using Siteorigin Page Builder the latest version and latest version of WordPress.
My website will be multi language so I use Polylang.
I am trying to use a “page” entry created in Siteorigin as footer for different language.
So I’ll have different footer for a particular language.
I put this code in my footer.php

$lang=get_bloginfo("language");
				if($lang=='ar'){
				$page_slug ='footer-ar';
				$page_data = get_page_by_path($page_slug);
				$page_id = $page_data->ID;
				echo apply_filters('the_content', $page_data->post_content);
				} else {
				$page_slug ='footer-en';
				$page_data_footer = get_page_by_path($page_slug);
				$page_id = $page_data->ID;
				echo apply_filters('the_content', $page_data->post_content);
				}

This will check the language and then get the content of the page depending on the language.
What is happening is that it output the main content twice.
Meaning not outputting what is the content of the footer.
Can anyone help me with this?
Or should I try a different and better approach?

This is our free support forum. Replies can take several days.

Need fast email support? Get SiteOrigin Premium

Have a different question or issue?

Start New Thread