How to put a text section in the main page

Here’s a tutorial on how to put a text section in the main page (just right before the main listing). You can see this on my site www.cars.cebulive.com (below).

main_page_text_classipress

First you have to find the code below in the index.php using the theme editor in the dashboard. Simply click on Appearance then Editor and there you will find it.

<div class=”content”>
<ul class=”nav”>
<li<?php if ( is_home() ) { echo ” class=\”current-cat\”"; } ?>><a href=”<?php bloginfo(‘url’); ?>” ><?php _e(‘Latest Listings’); ?></a></li>

And before that add this code;
<div class=”content”>
<div class=”main”>
<div class=”listing”>

YOUR TEXT HERE</div>
</div>
</div>
</div>

Just replace the “YOUR TEXT HERE” with your own. Enjoy.

Have a great day.

This entry was posted in Plugins and Mods and tagged . Bookmark the permalink.

9 Responses to How to put a text section in the main page

  1. steve krause says:

    I did just what you said and it works great. However, I added an image within the text box, similar to how you did it. However, when I go to page 2 of my listings, the image no longer shows.

    Just a blank box. Any idea why? Do I need to change a different core file for it to keep my image up through the entire site?

  2. admin says:

    Kindly recheck where you put the codes. Mine are ok even when I navigate to the next page. Here’s my site http://www.cars.cebulive.com.

  3. steve krause says:

    Yep, good call. I just had the image source path wrong.

    Thanks.

    It’s a really cool feature.

    I’m glad you set up this blog. I look forward to getting some more tips.

  4. Pupilo says:

    Dear Admin,
    thank you for sharing your great customizations.

    I have installed the latest CP version 2.9.2
    I tried putting your code into the index.php but I noticed that it has changed in the new version.

    I guess that the code you mention here should be modified a bit for 2.9.2?, I can´t find the lines of code you mention above.

    In 2.9.2 where should I paste the code you suggest?, and your code is still the same? or it has to be updated?
    Please advice!

    Thanks a lot
    Pupilo

  5. admin says:

    Thanks for dropping by.

    Anyway, the code is still there with version 2.9.2 (index.php).

    Or you can find this code (these are the first few lines of code in the index.php).

    < ?php
    require_once dirname( __FILE__ ) . '/form_process.php';
    get_header( );
    include_classified_form( );
    ?>

    and then after that put the code I have mentioned above.

  6. marc says:

    Hi!!
    Great list of tips!
    I’d like to do this but have it only show up on the main page. I want to use the area to show a graphical representation of the categories. when a user clicks the image it takes them to the category list.
    any clue how to make it only show on the main page?

  7. zulu42 says:

    what do you think of using the category description as the text section? that would ensure that every category displays something else…

  8. admin says:

    It can definitely be done. I’ll post a tutorial for that soon.

  9. warren says:

    Thank you..

    It help me alot..!

    i’ll mark your site..

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word