Home>Support>Use a page entry as footer and header in page

Use a page entry as footer and header in page

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. If you need fast email support, please purchase a SiteOrigin Premium license.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More