Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Help using a static homepage with custom elegant themes template WordPress

  • REFUNDED

Hey,

I have a modified elegant themes theme on my homepage at http://www.itcallout.com.au

I am trying to make this page the new static homepage;

http://www.itcallout.com.au/computer-repairs-perth/

And there are options within elegant themes 'thecorporation' theme that i am using to set a static homepage instead of the slider, but when I set that page above it doesnt show it at all and just shows my header and footer. (This is setting the static homepage within the theme options)

I've tried the wordpress function under 'reading' in the settings of wordpress to set the static homepage but that makes no difference.

I think the solution lies in editing the code, ill paste some of it below

I understand because of my custom theme this might not be possible to fix without logging into my wordpress installation so thats a possibility if someone wants to help..

here is my home.php


<?php get_header(); ?>

<?php if (get_option('thecorporation_services') == 'on') { ?>
<div id="services" class="clearfix">

<div class="one-third">
<?php query_posts('page_id=' . get_pageId(html_entity_decode(get_option('thecorporation_service_1')))); while (have_posts()) : the_post(); ?>
<?php get_template_part('includes/service_content'); ?>
<?php endwhile; wp_reset_query(); ?>
</div> <!-- end .one-third -->

<div class="one-third">
<?php query_posts('page_id=' . get_pageId(html_entity_decode(get_option('thecorporation_service_2')))); while (have_posts()) : the_post(); ?>
<?php get_template_part('includes/service_content'); ?>
<?php endwhile; wp_reset_query(); ?>
</div> <!-- end .one-third -->

<div class="one-third">
<?php query_posts('page_id=' . get_pageId(html_entity_decode(get_option('thecorporation_service_3')))); while (have_posts()) : the_post(); ?>
<?php get_template_part('includes/service_content'); ?>
<?php endwhile; wp_reset_query(); ?>
</div> <!-- end .one-third -->

</div> <!-- end #services -->
<?php }; ?>

<?php get_template_part('includes/default'); ?>

<?php get_footer(); ?>


here is my default.php;

<?php $fullWidthPage = is_page_template('page-full.php'); ?>
<div id="content-area" class="clearfix<?php if ( $fullWidthPage ) echo(' fullwidth_home');?>">

<div class="entry<?php if (get_option('thecorporation_blog_style') == 'false') echo(' page'); ?>">
<?php if (is_page()) { //if static homepage
if (have_posts()) : while (have_posts()) : the_post();
get_template_part('includes/homepage_content');
endwhile; endif;
} else {
if (get_option('thecorporation_blog_style') == 'on') get_template_part( 'includes/blogstyle_home');
else {
query_posts('page_id=' . get_pageId(html_entity_decode(get_option('thecorporation_home_page_1'))) ); while (have_posts()) : the_post();
get_template_part('includes/homepage_content');
endwhile; wp_reset_query();
};
}; ?>
</div> <!-- end .entry -->

</div> <!-- end #content-area -->

<?php if ( !$fullWidthPage ) { ?>
<?php if (get_option('thecorporation_blog_style') == 'false' && get_option('thecorporation_homepage_widgets') == 'false') get_template_part('includes/fromblog'); else get_sidebar(); ?>
<?php }; ?>


here is my blogstyle_home.php

<div class="post index">
<?php get_template_part('includes/entry','home'); ?>
<div class="clear"></div>
</div> <!-- end .post -->



my main index template
<?php get_header(); ?>

<div id="content-area" class="clearfix">
<?php get_template_part('includes/entry'); ?>
</div> <!-- #content-area -->

<?php get_sidebar(); ?>
<?php get_footer(); ?>




my fullwidth page template
<?php
/*
Template Name: Full Width Page
*/
?>

<?php if (is_front_page()) { ?>
<?php get_template_part('home'); ?>
<?php } else { ?>


<?php get_header(); ?>

<div id="content-area" class="clearfix fullwidth">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div class="post clearfix">
<?php $width = (int) get_option('thecorporation_thumbnail_width_pages');
$height = (int) get_option('thecorporation_thumbnail_height_pages');
$classtext = 'thumbnail-post alignleft';
$titletext = get_the_title();

$thumbnail = get_thumbnail($width,$height,$classtext,$titletext,$titletext);
$thumb = $thumbnail["thumb"]; ?>

<?php if($thumb <> '' && get_option('thecorporation_page_thumbnails') == 'on') { ?>
<?php print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext , $width, $height, $classtext); ?>
<?php }; ?>
<?php the_content(); ?>
<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
<?php edit_post_link(esc_html__('Edit this page','TheCorporation')); ?>
<div class="clear"></div>
</div> <!-- end .post -->

<?php if (get_option('thecorporation_show_pagescomments') == 'on') comments_template('', true); ?>
<?php endwhile; endif; ?>
</div> <!-- end #content-area -->

<?php get_footer(); ?>
<?php } ?>



page template;

<?php if (is_front_page()) { ?>
<?php get_template_part('home'); ?>
<?php } else { ?>
<?php get_header(); ?>
<div id="content-area" class="clearfix">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div class="post clearfix">
<?php $width = (int) get_option('thecorporation_thumbnail_width_pages');
$height = (int) get_option('thecorporation_thumbnail_height_pages');
$classtext = 'thumbnail-post alignleft';
$titletext = get_the_title();

$thumbnail = get_thumbnail($width,$height,$classtext,$titletext,$titletext);
$thumb = $thumbnail["thumb"]; ?>

<?php if($thumb <> '' && get_option('thecorporation_page_thumbnails') == 'on') { ?>
<?php print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext , $width, $height, $classtext); ?>
<?php }; ?>
<?php the_content(); ?>
<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>

by <a href="https://www.google.com/+PaulStoneMr?rel=author">Paul Stone</a>

<?php edit_post_link(esc_html__('Edit this page','TheCorporation')); ?>
<div class="clear"></div>
</div> <!-- end .post -->

<?php if (get_option('thecorporation_show_pagescomments') == 'on') comments_template('', true); ?>
<?php endwhile; endif; ?>
</div> <!-- end #content-area -->

<?php get_sidebar(); ?>
<?php get_footer(); ?>
<?php } ?>

Answers (3)

2014-06-20

Remy answers:

Static home page use front-page.php template for display, not home.php (I Know it´s confusing). You can try to copy ans rename the template you want to display to get the desired result


drifta303 comments:

I tried that and it didnt work =/

2014-06-20

timDesain Nanang answers:

i am sorry for my answer before.

try this:
go to theme option:
- click General settings
- click Homepage tab, then <strong>disable</strong> "Display Services" and "Display Sidebar Widgets on Homepage" options
- click Featured Slider tab, then <strong>disable</strong> "Display Featured Slider" and "Duplicate Featured Articles" options

then go to Reading Setting:
click a static page as Front page display, then select the page (computer-repairs-perth)

note: you can enable/ disable "Use pages" options under Featured Slider tab, then check the difference. :)


drifta303 comments:

I tried this, but it still shows a blank page =(

2014-06-20

Sébastien | French WordpressDesigner answers:

there is a documentation in your downloaded pack


drifta303 comments:

The documentation doesnt help me