• Resolved eduvauchelle

    (@eduvauchelle)


    http://www.contrecoups.com/work
    that is the site i am working on.

    So i have a list of work that will appear in the box under “Work,” i want to add on top a link called “Blog” that will link to a page with blog entries, BUT i don’t want those titles to appear in the “Work,” link titles.

    does that make sense?

    I also don’t know how to have the “Blog” link load a new page with that category entries only?

    HELP.

    i am usiing this for the list of work

    <?php wp_get_archives(‘type=postbypost&limit=5000’); ?>

Viewing 14 replies - 1 through 14 (of 14 total)
  • Thread Starter eduvauchelle

    (@eduvauchelle)

    no one./….

    The simplest way: have a category called “Work” and another one “Blog”. The rest is done by WP and plugins.

    Thread Starter eduvauchelle

    (@eduvauchelle)

    can you explain your concept a little more please.
    i am new to all this.

    thanks

    Thread Starter eduvauchelle

    (@eduvauchelle)

    i have a blog and work category,
    and subcategories in work as well

    work is not a link though.

    i only want BLOG to be a link to a new page taht loads entries to the blog category

    I could, although before that it would be beneficial if YOU explain to me how is the whole site/content organized πŸ™‚
    I mean: what will be on this work/index.php page? Will it be a static Page (home.php?) with some static and dynamic elements?
    Will the “Work” category be displayed ONLY in the sidebar?
    Will there be other categories besides the two?

    Thread Starter eduvauchelle

    (@eduvauchelle)

    The way the site works.
    It has a home.php file that overrides teh index.php for the site structure so that i can have my intro page with random image blocks as seen http://www.contrecoups.com/work

    then i have a scrolling div box with this code:
    where i want all teh titles from the category WORK only to show.

    <?php wp_get_archives(‘type=postbypost&limit=5000&cat=2’); ?>

    but i also want to add on top where it says Work a link called Blog that i want to load a new page with latest 5 blog entries, and next/previous page at the bottom of the page too.

    You are on the right track, if I understood it well.
    Next what you need is an archive.pgp or a category.php (you can make those by saving the index.php as…) to display your so-called category archives.
    If you want to style it differently, you can even use a category-X.php, where X = your Blog category’s ID#.
    See more details on:
    http://codex.wordpress.org/Template_Hierarchy
    http://codex.wordpress.org/Category_Templates

    For further customization you might consider this plugin:
    http://guff.szub.net/2005/07/21/post-templates-by-category/

    HTH
    Then add manually a link to the top of your home.php pointing to the Blog category – depending on your permalinks it would be something like
    example.com/?cat=X or
    example.com/category/blog
    (Note you can replace the word “category” with anything you like, but you cannot leave it out)

    Thread Starter eduvauchelle

    (@eduvauchelle)

    cool i will try that.

    now how do i only show the WORK titles in my navigation on the left.

    Also do you have any idea why those titles on the left don’t return to the line and all butt each other.

    thanks moshu you are a great help. this is all so new to me.

    but i am learning

    Thread Starter eduvauchelle

    (@eduvauchelle)

    so that worked for th blog page.

    now, i just thought of another loop hole.

    say i want only the latest 5 posts in BLOG to show and then have NEXT / PREVIOUS entry button at the bottom of that page to go the other posts of BLOG only so that i don’t end up with a page that has 200 entries in the next 4 months…

    sorry to ask so many questions, it’s all confusing.

    e

    Thread Starter eduvauchelle

    (@eduvauchelle)

    it might be worth noting i am not using a sidebar.php or content.php or whatever, i remade a single page with all my code i find it easier this way to manage.

    e

    Thread Starter eduvauchelle

    (@eduvauchelle)

    ok sorry got the post thing and all with next previous.

    now….

    i still can’t remove or find the answer to only showing the TITLES to the work navigation on the left and not have the titles of the blog category.

    any help…

    You mean to show in that “frame-like” thing only the posts from the Work category?

    It depends what kind of code (Loop) are you using there. Oh, I see now, you mentioned above using the get_archives. That wouldn’t work, since it doesn’t have a category exclusion feature.

    Instead, consider using a mini-Loop, query_posts or something like that.
    http://codex.wordpress.org/The_Loop (and related links)
    http://codex.wordpress.org/Template_Tags/query_posts

    Thread Starter eduvauchelle

    (@eduvauchelle)

    yeah i looked at that, but i just don’t understand it.

    as i mentioned before i am using one page only, and no sidebar, header or footer PHP files

    here is my code:

    <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”&gt;
    <html xmlns=”http://www.w3.org/1999/xhtml”&gt;

    <head profile=”http://gmpg.org/xfn/11″&gt;
    <meta http-equiv=”Content-Type” content=”<?php bloginfo(‘html_type’); ?>; charset=<?php bloginfo(‘charset’); ?>” />
    <title><?php bloginfo(‘name’); ?><?php wp_title(); ?></title>
    <meta name=”generator” content=”WordPress <?php bloginfo(‘version’); ?>” /> <!– leave this for stats please –>
    <style type=”text/css” media=”screen”>
    @import url( <?php bloginfo(‘stylesheet_url’); ?> );
    </style>
    <link rel=”alternate” type=”application/rss+xml” title=”RSS 2.0″ href=”<?php bloginfo(‘rss2_url’); ?>” />
    <link rel=”alternate” type=”text/xml” title=”RSS .92″ href=”<?php bloginfo(‘rss_url’); ?>” />
    <link rel=”alternate” type=”application/atom+xml” title=”Atom 0.3″ href=”<?php bloginfo(‘atom_url’); ?>” />
    <link rel=”Shortcut Icon” href=”<?php bloginfo(‘stylesheet_directory’); ?>/favicon.ico” type=”image/x-icon” />
    <link rel=”pingback” href=”<?php bloginfo(‘pingback_url’); ?>” />
    <?php wp_get_archives(‘type=monthly&format=link’); ?>
    <?php wp_head(); ?>

    </head>

    <body>
    <div id=”container”><!– begin container –>

    <div id=”sidebar”><!– begin sidebar –>

    <div id=”header”>
    <img src=”image.gif” />
    <?php bloginfo(‘name’); ?>
    </div>
    <div id=”desc”>
    »<?php bloginfo(‘description’); ?>
    </div>

    <div id=”shortbio”>
    Contre Coups is the creative studio and portfolio of Eric Duvauchelle focusing on graphic design, web & interaction design, luxury & street brands and soon: <i><b><u>you</u></b></i>.
    <br>
    <br>
    hello{at}contrecoups.com<br>
    C: 503.453.6105<br>
    </div>

    <!– begin sidebar –>

    <h3>Blog,</h3>
    <h3>Work,</h3>

    <form id=”searchform” method=”get” action=”<?php echo $_SERVER[‘PHP_SELF’]; ?>”>
    <div>
    <input class=”box” type=”text” name=”s” id=”s” />
    <input class=”button” type=”submit” id=”searchsubmit” value=”Search” />
    </div>
    </form>

    <!– begin scroller –>
    <div id=”contentblock”>
    <div id=”content-wrapper”>
    <div id=”content”>

    <?php wp_get_archives(‘type=postbypost&limit=5000&cat=2’); ?>

    </div><!– close content –>
    </div><!– close content wrapper –>

    <!–=== DIV::SCROLLBAR ===–>
    <div id=”scroll-wrapper”>
    <div id=”scroll”></div>
    </div>

    </div><!– close contentblock –>
    <!– end scroller –>

    <div id=”sidebarfooter”>

    <div class=”credit”>
    Work © to Eric Duvauchelle
    Contre Coups 2000/2007
    </div>
    <?php _e(‘Feeds’); ?>
    ” title=”<?php _e(‘Syndicate this site using RSS’); ?>”><?php _e(‘RSS Contents’); ?>
    </div>

    </div><!– end sidebar –>

    <div id=”main”><!– begin main –>

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    <div class=”post” id=”post-<?php the_ID(); ?>”>

    <h3 class=”storytitle”><?php the_title(); ?></h3>

    <div class=”meta”><?php the_time(‘Y’); ?>
    </div>

    <div>
    <?php the_content(__(‘(more…)’)); ?>
    </div>

    </div>

    <?php endwhile; else: ?>
    <p><?php _e(‘Sorry, no posts matched your criteria.’); ?></p>
    <?php endif; ?>

    </div><!– end main –>

    </div><!– end container –>

    </body>
    </html>

    Thread Starter eduvauchelle

    (@eduvauchelle)

    OK
    got it to work

    i used this loop

    <?php
    query_posts(‘category_name=work&posts_per_page=-1’);
    while (have_posts()) { the_post(); ?>

    ” rel=”bookmark” title=’Permanent Link to “<?php the_title(); ?>”‘><?php the_title(); ?>

    <?php } ?>

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘show only one category and exclude titles from a category’ is closed to new replies.