• Hello!

    I run a fansite at https://www.stillnsync.com and we had our template created for us but any changes we want, we have to do ourselves. I’d like to accomplish three things:

    As you can see on our index page, the post titles do not link to individual post. I’m not sure why this template was created this way, but it’s bothersome, now that I’ve been working with it for six months. You can’t get to a single post unless you click on ‘comment’. It would be more useful to us to have each post title link to the single post.

    In another thread along the same lines, I found this code:
    <h2>” rel=”bookmark” title=”Permanent Link to <?php the_title_attribute(); ?>”><?php the_title(); ?></h2>

    This is the code that is in our template:
    <div class=wrapper><div class=maintitle><i><?php the_title(); ?></i></div><div class=subtitle>

    Would I simply replace all of the current code with the new code?

    I assume, then that this would rid us of the italics in the title?

    Lastly, If I want to add an ‘edit’ link, would I add that in index.php, or just in post.php and page.php?

    I’ve looked through the wordpress template tutorials but I’m always afraid of screwing something up. Many thanks in advance for clarification.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Try:

    <div class=wrapper><div class=maintitle><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></div><div class=subtitle>

    To create an edit link, you’ll need to add <?php edit_post_link(); ?> to index.php and page.php. Not sure what post.php is.

    Thread Starter curvy-jones

    (@curvy-jones)

    That worked on index. Thank you!

    I think I meant single.php. It appears post titles aren’t clickable on single.php either. I’ll see if I can figure that part out. The wrapper part threw me off.

    Why would post titles be clickable on the single post page? Where would the link go to?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Post titles as links on index, adding ‘edit’ link’ is closed to new replies.