How to Custom Page display in Front Page?

<?php
$page_name = array(9,10,11); // 123 should be replaced with a specific Page’s id from your site, which you can find by mousing over the link to edit that Page on the Manage Pages admin page. The id will be embedded in the query string of the URL, e.g. page.php?action=edit&post=123.

$company_solution_data = get_page( $page_name[0] ); // You must pass in a variable to the get_page function. If you pass in a value (e.g. get_page ( 123 ); ), WordPress will generate an error.
$company_portfolio_data = get_page( $page_name[1] );
$company_testimonials_data = get_page( $page_name[2] );
?>
<div id=”solutionzone”>
<?php
$company_solution_content = apply_filters(‘the_content’, $company_solution_data->post_content); // Get Content and retain WordPress filters such as paragraph tags. Origin from: http://wordpress.org/support/topic/get_pagepost-and-no-paragraphs-problem
$company_solution_title = $company_solution_data->post_title; // Get title
echo ‘<h2>’.$company_solution_title.'</h2>’;
if (strlen($company_solution_content)>130)
{            echo “<p>”.substr($company_solution_content,0,128).”…</p><div class=’clr’></div>”; // Output Content
echo ‘<a href=”?page_id=9″>more</a><div></div>’;
}
else{
echo $company_solution_content;
}
?>

Leave a Reply

© 2020 Spirituality