1

please help me ... i'm nubiew on EE.

how to display the latest article on the front page, so I want each of my finished publishing my article and the article was immediately appear on the front page.

how to change this into a recent article:

<div class="container">
            <div class="row">
                <div class="span6">
                    <h3>Latest News</h3>
                    <ul class="bloglist-small">
                        <li>
                            <div class="date-box">
                                <span class="day">28</span>
                                <span class="month">SEP</span>
                            </div>
                            <div class="txt">
                                <h5><a href="#">Lorem ipsum sit amet</a></h5>
                                <span class="read">Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem</span>
                                <span class="info">Sept 23, 2013 | <a href="#">Read More</a></span>
                            </div>
                        </li>
                        <li>
                            <div class="date-box">
                                <span class="day">24</span>
                                <span class="month">SEP</span>
                            </div>
                            <div class="txt">
                                <h5><a href="#">Lorem ipsum sit amet</a></h5>
                                <span class="read">Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem</span>
                                <span class="info">Sept 23, 2013 | <a href="#">Read More</a></span>
                            </div>
                        </li>
                        <li>
                            <div class="date-box">
                                <span class="day">20</span>
                                <span class="month">SEP</span>
                            </div>
                            <div class="txt">
                                <h5><a href="#">Lorem ipsum sit amet</a></h5>
                                <span class="read">Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem</span>
                                <span class="info">Sept 23, 2013 | <a href="#">Read More</a></span>
                            </div>
                        </li>
                    </ul>
                </div>

this is screenshot: danchindia screenshot

and this is my web danchindia.com

2 Answers 2

1

Dan, i will advice you to take some time and learn the basic concept behind EE -:) There are free tutorials around, on Train-ee for example you can follow the free tutorials. Building a Simple News Site from Start to Finish is part of the official User Guide.

To show the 3 latest news, you can use this..

<ul>
{exp:channel:entries channel="news" limit="3"}
<li>
<div class="date-box">
<span class="day">{entry_date format="%d"}</span>
<span class="month">{entry_date format="%M"}<</span>
</div>

<div class="txt">
<h5><a href="{url_title_path='news'}">{title}</a></h5>
<span class="read">{YOUR_CUSTOM_FIELD}</span>
<span class="info">{entry_date format="%F %j, %Y"} | <a href="{url_title_path='news'}">Read More</a></span>
</div>
</li>                                               
{/exp:channel:entries}
</ul>
0
1

Try to create a snippet called {sp_lastest_post} and place these lines inside it

<ul class="bloglist-small">
    {exp:channel:entries channel="channel_name"
                         category="cat_id"
                         limit="10"}

        {!-- Begin Loop --}
        {!-- Replace below values with channel entries tag variables --}
        <li>
            <div class="date-box">
                <span class="day">28</span>
                <span class="month">SEP</span>
            </div>
            <div class="txt">
                <h5><a href="#">Lorem ipsum sit amet</a></h5>
                <span class="read">Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem</span>
                <span class="info">Sept 23, 2013 | <a href="#">Read More</a></span>
            </div>
        </li>

        {!-- No Results Message --}
        {if no_results}<h4>Updating...</h4>{/if}


    {/exp:channel:entries}
</ul>

Then place the snippet to wherever you want your posts to appear.

1
  • I'm glad it helps! Cheers!
    – Hung Q. Le
    Commented Dec 5, 2013 at 10:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.