WordPress.org

Ready to get started?Download WordPress

Forums

Additional information and pitcures in Permalinks (11 posts)

  1. ntronics
    Member
    Posted 8 years ago #

    Sorry if these are stupid question, but I wanted to know, if there is a way to edit my permalinks so that it will display additional information and pitcures, for each single post? So for instance, if I posted about "apple ipod video," and the reader clicks on the permalink, it will show extra info and pics, on the permalink page. Right now my permalink shows the same thing as the post. I would like to add extra things within the permalink. Also, how do you make the title of each post's permalink display on top of the browsers. For example, if you look above your browser now it should say "WordPress > Additional information and pitcures in Permalinks, etc etc." For example if I created a post called apple "ipod video" and the reader clicks on the permalink it will display the title on the top of the browser their using.

    Furthermore, If this has been answered already can you point me to where I can get the answer, for I've searched long and hard and didn't come up with anything.

    Thanks

  2. ntronics
    Member
    Posted 8 years ago #

    Please someone, any suggestions will be greatly appreciated.

    Thanks.

  3. Cypher
    Member
    Posted 8 years ago #

    I have to say that I completely don't understand what you are asking..

    Permalinks just provide a Pretty way of looking at an URL to a post. The real URL being <blog.com>/?p=<post id>. Instead of that you get something like <blog.com>/posts/2006/03/15/post-title.

    What do you want to accomplish again? I don't get this additional information and pictures part.

    Regards

  4. ntronics
    Member
    Posted 8 years ago #

    ok I'll try a to explain a little better. Say I posted about apples with one picture of a apple. Now in the post I only want to write a summary about apples. Therefore when a reader clicks on my permalink, I would like it to displays additional information, or more pics about apples.

    Thanks for your reply.

  5. Cypher
    Member
    Posted 8 years ago #

    This has nothing to do with permalinks. What you could do is use custom fields to describe a particular post, that is, have "apple" in there. Then in your "single.php" file when you pull up a particular post, you would read the custom field for that post and compare that string to custom fields of other posts and then display them as you see fit.

    Regards

  6. ntronics
    Member
    Posted 8 years ago #

    Wow, I guess this is more difficult to do then I thought. I thought it was just something I was overlooking in the admin area or something.

  7. Cypher
    Member
    Posted 8 years ago #

    There is a plugin called Related Posts that might do most of this for you.

    Check it out here.

    I use it on my blog when you are viewing a particular post.

    Regards

  8. petit
    Member
    Posted 8 years ago #

    Or, maybe you're simply after writing the introductory stuff about those apples as an "excerpt", just showing the excerpt on the main page. Then by clicking the post title or a "read more" link, show the whole post avec pictures and further info.
    This would be the standard way of exposing just little then more in wordPress.
    http://codex.wordpress.org/Template_Tags/the_excerpt#Examples

  9. ntronics
    Member
    Posted 8 years ago #

    Thank you Cypher and petit, for your answers. Petit, you've hit it on the head, except, I have no idea what to do with that string of code you refer me to. Where exactly would I put it within my WP loop.

    Please refer to my site to get an idea of what I want to do.

    http://www.ntronics.com

    clicking on the permalink for any given post takes you to the permalink page, but I want to display more information on the permalink page than what was in the post on the home page. Thanks again.

  10. petit
    Member
    Posted 8 years ago #

    First a little bit of background:

    If you read up on The Loop in Action, you'll find this:
    <div class="entry">
    <?php the_content('Read the rest of this entry &raquo;'); ?>
    </div>

    What it means is that if you have a <!-- more --> tag in your post, only the part above the more tag will show up on the first page, and clicking a link or the post title will show the whole post on a single page.

    I think this is not your best solution. Instead you could make it a habit to always write an introduction or abstract for your post in the excerpt input field.
    The you could use the code I referred to in my last answer.

    Now - where do you put it?

    In your index.php file, you'll find something like

    <?php the_content('Read the rest of this entry &raquo;'); ?>

    This will be within a block like

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

    You should replace the function the_content()
    with

    <?php if(is_category() || is_archive()) {
    the_excerpt();
    }
    else {
    the_content();
    } ?>

    which means that on category or archive pages, you will show only the exerpts, while on single pages you'll show the whole post.

    If you want to show only exerpts on the main page you can change the condition to
    if(is_category() || is_archive() || is_home()){

    I guess some programming habits wouldn't hurt, but in any case, don't forget to take a backup of the file you change.

  11. ntronics
    Member
    Posted 8 years ago #

    Thanks for the help petit, after reading the document and tips you gave me, I will attempt to do this today. Thanks again.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags