How do I remove the recently add on the home page to add text

Discussion in 'GeoCraft WordPress Theme' started by kwhitinger, Feb 2, 2013.

Thread Status:
Not open for further replies.
  1. kwhitinger

    kwhitinger New Member

    Joined:
    Dec 8, 2012
    Messages:
    15
    Likes Received:
    1
    I would like to put some text into the homepage where the Recently added listings are. How do I go about doing that? I did try the blog home page but I couldn't get the widgets to change on the right side.

    I would like to do something like the screen shot I included.
     

    Attached Files:

  2. Nitesh

    Nitesh Support Staff

    Joined:
    Oct 19, 2012
    Messages:
    5,165
    Likes Received:
    160
    Go to the Appearance > Widget and add your text in the "Home Page Widget Area".
    It will replace Recent listings.
     
  3. kwhitinger

    kwhitinger New Member

    Joined:
    Dec 8, 2012
    Messages:
    15
    Likes Received:
    1
    Nitesh - I already know about the widget area. I have attached an image to show you what i am talking about. This is the only area that is preventing me from switching everything over. I don't need that Recently Added section on my homepage that it is now. I need to be able to have text, video and such as the main part of the home page. not in the widget area. I love the Theme and want to get it live, as it would be a big upgrade from premium press, if I can get some help in resolving this.
     

    Attached Files:

  4. Gourav

    Gourav Support Staff

    Joined:
    Oct 19, 2012
    Messages:
    7,728
    Likes Received:
    207
    Go to front-page.php present in your theme directory and remove the code given below

    Code:
            <h1 class="featured_title"><?php if (geocraft_get_option('home_recent_txt') != '') echo geocraft_get_option('home_recent_txt'); ?></h1>
                    <?php
                    /* Get all Sticky Posts */
                    $sticky = get_option('sticky_posts');
                    /* Sort Sticky Posts, newest at the top */
                    rsort($sticky);
                    /* Get top 5 Sticky Posts */
                    $sticky = array_slice($sticky, 0, 5);
                    /* Query Sticky Posts */
                    $limit = get_option('posts_per_page');
                    $post_type = POST_TYPE;
                    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;               
                    query_posts(array(
                        'post__in' => $sticky,
                        'ignore_sticky_posts' => 1,
                        'post_type' => $post_type,
                        'showposts' => $limit,
                        'paged' => $paged
                    ));
                    $wp_query->is_archive = true;
                    $wp_query->is_home = false;
                    ?>
                    <?php if (have_posts()) : ?>               
                    <?php
                    while (have_posts()): the_post();
                        global $post;
                        //$featured_post_list = get_post_meta($post->ID, 'geocraft_f_checkbox2', true);
                        $featured_class = '';
                        $is_pro = get_post_meta($post->ID, 'geocraft_listing_type', true);
                        if ($is_pro == 'pro') {
                            $featured_class = 'featured';
                        }
                        $img_meta = get_post_meta($post->ID, 'geocraft_meta_image1', true);
                        $imgfind = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
                        $is_featured = get_post_meta($post->ID, 'geocraft_f_checkbox1', true);
                        ?>
                        <!--Start Featured Post-->
                        <div class="featured_post">
                            <div class="<?php echo $featured_class; ?>">
                                <!--Start Featured thumb-->
                                <div class="featured_thumb">
                                    <?php if ((function_exists('has_post_thumbnail')) && (has_post_thumbnail())) { ?>
                                        <?php inkthemes_get_thumbnail(128, 108, '', $img_meta); ?>
                                    <?php } else { ?>
                                        <?php inkthemes_get_image(128, 108, '', $img_meta); ?>
                                        <?php
                                    }
                                    ?>
                                    <?php if ($is_pro == 'pro') { ?>
                                        <img class="ribbon" src="<?php echo get_template_directory_uri(); ?>/images/ribbon.png"/>
                                        <?php } ?>
                                    <ul class="star_rating">
                                        <?php
                                        global $post;
                                        echo geocraft_get_post_rating_star($post->ID);
                                        ?>
                                    </ul>
                                    <span class="review_desc"><?php comments_popup_link(N_RV, _RV, '% ' . REVIEW); ?></span> </div>
                                <!--End Featured thumb-->
                                <div class="f_post_content">
                                    <h4 style="margin-bottom: 3px !important;" class="f_post_title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h4>
                                    <?php if (get_post_meta($post->ID, 'geo_address', true)): ?>
                                        <p class="f_post_meta"><img src="<?php echo TEMPLATEURL . '/images/location-icon.png'; ?>"/>&nbsp;&nbsp;<?php echo get_post_meta($post->ID, 'geo_address', true); ?></p>
                                    <?php endif; ?>
            <?php the_excerpt(); ?>
            <!--                                <a class="read-more" href="<?php the_permalink() ?>"><?php _e('Read More', THEME_SLUG); ?></a>-->
                                </div>
                            </div>
                        </div>
                        <!--End Featured Post-->
                        <?php
                    endwhile;
                    endif;
                    wp_reset_query();               
                    /* Get all Sticky Posts */
                    $sticky = get_option('sticky_posts');
                    /* Sort Sticky Posts, newest at the top */
                    rsort($sticky);
                    /* Get top 5 Sticky Posts */
                    $sticky = array_slice($sticky, 0, 5);
                    query_posts(array(
                        'post__not_in' => $sticky,
                        'ignore_sticky_posts' => 1,
                        'post_type' => $post_type,
                        'showposts' => $limit,
                        'paged' => $paged
                    ));
                    if (have_posts()) :
                    while (have_posts()): the_post();
                        global $post;
                        //$featured_post_list = get_post_meta($post->ID, 'geocraft_f_checkbox2', true);
                        $featured_class = '';
                        $is_pro = get_post_meta($post->ID, 'geocraft_listing_type', true);
                        if ($is_pro == 'pro') {
                            $featured_class = 'featured';
                        }
                        $img_meta = get_post_meta($post->ID, 'geocraft_meta_image1', true);
                        $imgfind = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
                        $is_featured = get_post_meta($post->ID, 'geocraft_f_checkbox1', true);
                        ?>
                        <!--Start Featured Post-->
                        <div class="featured_post">
                            <div class="<?php echo $featured_class; ?>">
                                <!--Start Featured thumb-->
                                <div class="featured_thumb">
                                    <?php if ((function_exists('has_post_thumbnail')) && (has_post_thumbnail())) { ?>
                                        <?php inkthemes_get_thumbnail(128, 108, '', $img_meta); ?>
                                    <?php } else { ?>
                                        <?php inkthemes_get_image(128, 108, '', $img_meta); ?>
                                        <?php
                                    }
                                    ?>
                                    <?php if ($is_pro == 'pro') { ?>
                                        <img class="ribbon" src="<?php echo get_template_directory_uri(); ?>/images/ribbon.png"/>
                                        <?php } ?>
                                    <ul class="star_rating">
                                        <?php
                                        global $post;
                                        echo geocraft_get_post_rating_star($post->ID);
                                        ?>
                                    </ul>
                                    <span class="review_desc"><?php comments_popup_link(N_RV, _RV, '% ' . REVIEW); ?></span> </div>
                                <!--End Featured thumb-->
                                <div class="f_post_content">
                                    <h4 style="margin-bottom: 3px !important;" class="f_post_title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h4>
                                    <?php if (get_post_meta($post->ID, 'geo_address', true)): ?>
                                        <p class="f_post_meta"><img src="<?php echo TEMPLATEURL . '/images/location-icon.png'; ?>"/>&nbsp;&nbsp;<?php echo get_post_meta($post->ID, 'geo_address', true); ?></p>
                                    <?php endif; ?>
            <?php the_excerpt(); ?>
            <!--                                <a class="read-more" href="<?php the_permalink() ?>"><?php _e('Read More', THEME_SLUG); ?></a>-->
                                </div>
                            </div>
                        </div>
                        <!--End Featured Post-->
                        <?php
                    endwhile;
                    wp_reset_query();
                    ?>
    <?php else: ?>
                    <div class="featured_post">
                        <p class="place"><?php echo NO_LST_FND; ?></p>
                    </div>
                <?php
                endif;
                wp_reset_query();
                ?>
    Sending image for reference

    [​IMG]


    Remove code from line number 114 to 259.
     
  5. kwhitinger

    kwhitinger New Member

    Joined:
    Dec 8, 2012
    Messages:
    15
    Likes Received:
    1
    Thanks, for the answer and help. Just one more thing, How do I go about adding my text and stuff in that space. I tried typing on the homepage but nothing showed up? I don't want to lose the slider and sidebar.

    Thanks,

    Ken
     
  6. Gourav

    Gourav Support Staff

    Joined:
    Oct 19, 2012
    Messages:
    7,728
    Likes Received:
    207
    The empty space you get after doing the customization given above, Use HTML tags in that area to add heading, paragraph and images.

    For example

    Code:
    <h4>Enter your heading</h4>
    Code:
    <p>Enter your paragraph text</p>
    Code:
    <img src="Enter your image address"/>
     
  7. kwhitinger

    kwhitinger New Member

    Joined:
    Dec 8, 2012
    Messages:
    15
    Likes Received:
    1
    Thanks guys
     
Thread Status:
Not open for further replies.

Share This Page