WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to edit part of the home page (6 posts)

  1. zab
    Member
    Posted 3 years ago #

    Hi,
    My site is BELIZESHARKS.ORG
    I have a custom theme made by a third party and am looking to change part of my HOME page. It contains 3 parts: a news feed (which is fine) sub header text & photo section and a section that is linked to a precise page (status of sharks and rays).
    I want to change the last 2 and cannot find where to go for that. I have gone to EDIT THEME>MAIN INDEX TEMPLATE file to change page it links to but it does not work.
    Where do I go to edit please?

    Thank you.
    Isabelle

  2. govpatel
    Member
    Posted 3 years ago #

    I want to change the last 2 and cannot find where to go for that. I have gone to EDIT THEME>MAIN INDEX TEMPLATE file to change page it links to but it does not work.

    change last two what clarify

  3. zab
    Member
    Posted 3 years ago #

    Thanks for picking up the post!
    I want to:
    a) change the lower right page link (excerpt of Status of sharks & rays) to an other post page. Something I will do regularly.

    b)I have tried to replace the 3 photos with a video and it does not work

  4. zab
    Member
    Posted 3 years ago #

    Please note that the 3 photos and text above are under HOME page

  5. govpatel
    Member
    Posted 3 years ago #

    Will need to see the code but i think they must be coming from posts on left and on right is aboutus1 which must a page.

  6. zab
    Member
    Posted 3 years ago #

    Here is the code. In the 2 instances where the code has =about-sharks-and-rays I have tried to change the name to the new post I want at its place. The text just disappears. Does it matter that I am trying to replace a page by a post?

    </div>
    <div class="aboutus1">
    <?php $welcome = new WP_Query('pagename=about-sharks-and-rays');
    if($welcome->have_posts()) : while($welcome->have_posts()) : $welcome->the_post(); ?>
    <h2><?php the_title();?></h2>
    <?php get_the_content_limit(500, 'read more...'); ?>
    <?php endwhile; endif; ?>

    </div>
    <div style="clear:both"></div>
    </div>
    </div>
    <?php }else{?>
    <div id="content" class="content1">
    <div class="content2">
    <div>
    <?php if (have_posts()) : while(have_posts()) : the_post(); ?>

    <h2><?php the_title();?></h2>

    <?php the_content(); ?>

    <?php endwhile; endif; ?>
    </div>
    <?php if(!is_page('sponsors-and-partners') )
    {?>
    <!--<div id="homepage">
    <div class="news">
    <h2>News</h2>
    <?php $my_query1 = new WP_Query('category_name=news&showposts=3'); ?>
    <?php while ($my_query1->have_posts()) : $my_query1->the_post(); ?>
    <?php get_the_content_limit(40, 'read more...'); ?>

    <?php endwhile; ?>

    </div>
    <div class="aboutus">
    <?php $welcome = new WP_Query('pagename=about-sharks-and-rays');
    if($welcome->have_posts()) : while($welcome->have_posts()) : $welcome->the_post(); ?>
    <h2><?php the_title();?></h2>
    <?php get_the_content_limit(400, 'read more...'); ?>
    <?php endwhile; endif; ?>

    </div>
    <div style="clear:both"></div>
    </div>-->
    <?php }?>
    </div>
    <h2 class="bottombg"></h2>
    </div>
    <?php }?>

Topic Closed

This topic has been closed to new replies.

About this Topic