• Resolved jamking

    (@jamking)


    Ok everyone I have another question let’s say I have a fashion tab and page at the top of my page and I create a new post about fashion, when I hit publish how can I make that post go to the fashion tab and page I created? or is that possible? I did create a fashion category. I don’t know if this has been covered if it has I’m sorry for not searching deeper

Viewing 5 replies - 1 through 5 (of 5 total)
  • It depends how you are displaying your menu.
    If you are hard-coding the menu, you can query that category and display the URL to the most recent post in that category.
    Here is one example:

    <?php
    // grab the latest post from the fashion category
    // assuming fashion is cat ID 8 (you'll have to change this)
    $latestFashionPost = new WP_Query();
    $latestFashionPost->query('cat=8&showposts=1');
    while ($latestFashionPostt->have_posts()) : $latestFashionPost->the_post(); ?>
    
    <li><a href="<?php the_permalink(); ?>">Fashion</a></li>
    
    <?php endwhile; ?>
    Thread Starter jamking

    (@jamking)

    Thank you racer the menu is not hard-coded it is part of Atahualpa Theme 3.4.4 options which has page menu bar, and category menu bar, options

    Bummer.
    When menus are coded like that to pull the links dynamically(and most themes are), it is very difficult to “tap into” that and do something different with one of the output values. I am not familiar with that theme, so I am not sure where you would even edit the code for the menu display.

    You would most likely have to create a custom page template to display that latest post I am afraid.
    That’s all I can think of.

    Thread Starter jamking

    (@jamking)

    Bummer is the word I am afraid, Thanks racer and since being a newbie can you point me in the right direction for a easy walk through tut for creating a customs page.

    Thread Starter jamking

    (@jamking)

    Thanks racer and everyone else, I went ahead and install a new wp blog on my server and used old faithful (page-to-links) plugin to direct my nav bar.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Post To Another Page’ is closed to new replies.