[HELP] Wordpress theme coding, adding classes to wordpress get functions

Discussion in 'WordPress' started by PinoyEngine™, Apr 26, 2011.

  1. #1
    Hi Guys! I am just coding a template from a scratch, I just want to know how to make this:

    1. TAGS
    I am using this code to call on tags in my wp theme:
    <?php the_tags('<li class="taglistproperty">','</li><li class="taglistproperty">','</li>'); ?>
    PHP:
    It will be successful to show the tags with its link. But I also want to add classes to these links.
    a.tags:link {
        padding : 3px;
        background : black;
        color : white;
        font-weight : bold;
        text-decoration : none;
    }
    Code (markup):
    2. List Pages.
    I have really no idea which code on our reference suits my needs. But what i want is also to list the pages and assign classes to the href and list.

    <div class="navbarfrontpagecontainer1">
        <div class="navbarfrontpagecontainer2">
        <ul class="navbarfrontpagelinklist">
            <li class="navbarfrontpagelinklist"><a href="#" class="navfrontpage" >>>PAGE TITLE<<</a></li>
        </ul>
        </div>
    </div>
    Code (markup):
    as you can see I need to summon the page titles and links, and put classes to it.

    3. List Articles from selected category.
    Hello! I am using this html snippet from my template:
            <div class="recentarticlescontainer1">
                <h2 class="recentarticles">Recent Articles</h2>
                <div class="recentarticlescontainer2">
                    <ul class="recentarticlescontainer2">
                        <li>
                            <div style="padding-bottom:3px"><a href="#" class="articlesfrontpagelink">This is the first article</a></div>
                            <div class="excerptstyle">Here comes the excerpt of the article. Here comes the excerpt of the article. Here comes the excerpt of the article. Here comes the excerpt of the article. <a class="morearticlesfrontpagelink" href="#">more!</a></div>
                        </li>
                        <li>
                            <div style="padding-bottom:3px"><a href="#" class="articlesfrontpagelink">This is the first article</a></div>
                            <div class="excerptstyle">Here comes the excerpt of the article. Here comes the excerpt of the article. Here comes the excerpt of the article. Here comes the excerpt of the article. <a class="morearticlesfrontpagelink" href="#">more!</a></div>
                        </li>
                    </ul>
                </div>    
            </div>
    Code (markup):
    What i want to happen there is:
    Select only articles from my category id = 3, put the title in this tag:
                            <div style="padding-bottom:3px">Read<a href="#" class="articlesfrontpagelink">This is the title of that article</a></div>
    Code (markup):
    and the excerpt of that article here:

                            <div class="excerptstyle">Here comes the excerpt of the article. Here comes the excerpt of the article. Here comes the excerpt of the article. Here comes the excerpt of the article. <a class="morearticlesfrontpagelink" href="#">more!</a></div>
    
    HTML:
    Sorry for my being noob. I really have no idea, but i promise that if I found this pattern, my future will be clear. Thanks.
     
    PinoyEngine™, Apr 26, 2011 IP