• Hey everyone. For starters here’s my website link:
    http://lexmedia.dnsalias.com/
    Ok here’s my issue. I’ve looked around and I can’t find a solution anywhere!
    I have my main article display on my index.php file. I would like it so that when they click on the permalink or the comments link they are taken to a page with a different template and layout thank my main page. I would just like to have the article and the comments, and the navigation, header, etc. Is this possible?
    Please, when responding, keep in mind that I have absolutely no knowledge of php. I have set the custom URI’s… you’ll see that when you click on the link.
    Thanks for all your help in advance,
    Alex – LexMedia Design Consultancy

Viewing 10 replies - 1 through 10 (of 10 total)
  • I cannot tell what version of wp you are running as you have removed the meta tag in the header that would tell me – and others.
    The function you may need is called ‘is_single’ and is AFAIK, a new feature in 1.3
    If you are tempted to upgrade to take advantage of this – do a search here for ‘is single’ to read more – then please first read the sticky post in this forum.

    I am using the latest version of WordPress… 1.3 I think. I can’t seem to find any documentation regarding the usage of is_single… How would I go about using this? Any help would be appreciated.

    Thread Starter lexmedia

    (@lexmedia)

    Where do I put this?

    Thread Starter lexmedia

    (@lexmedia)

    I’m not sure I’ve made myself clear as to what effect I’m trying to achieve… Here is a website that does what I want my website to do. Keep in mind this is just an example, and I’m fully aware that they are using MovableType.
    http://www.stopdesign.com/
    When you click on the title of an article it opens in an individual article page, with a different template then the main page.
    Thanks,
    Alex

    Create a single.php template in wp-content. That will be used to display single posts. Just copy your index.php to single.php and change it to suite.
    You can look at the Kubrick for 1.3theme for examples.
    This applies to 1.3 only, of course.
    Ryan

    Thread Starter lexmedia

    (@lexmedia)

    This is all automatic?

    Thread Starter lexmedia

    (@lexmedia)

    I tried creating a single.php template and it doesn’t appear to be working… Is there any modifications I have to do to the permalink setup? Currently I have it set as:
    /articles/%year%/%month%/%date%/%post_number%/
    and it shows as:
    /articles/2004/10/09/1/
    For reference: http://lexmedia.dnsalias.com/
    Thanks again!!!

    Thread Starter lexmedia

    (@lexmedia)

    I was mistaken… I am in fact using wordpress 1.2… Should I upgrade? Would that be the easiest way to go?
    If so, where can I find a stable version?
    If I should not upgrade, what options do I have avaliable to me?

    I wouldn’t recommend upgrading. 1.3 is still in alpha mode and not stable at all.
    For 1.2, see if this works. Make a copy of index.php and call it main.php.
    Open the main.php file, and remove the lines at the top where the wp-blog-header.php is included. Save it.
    Open index.php, remove everything after the include for wp-blog-header.php.
    After the include add this code:
    <?php
    if ($single) {
    include("single.php");
    }else{
    include("main.php");
    }
    ?>

    I think that will do it.
    Basicaly, what it does is this. If the $single flag is set, then it will include the single.php file, showing your single post. Otherwise it will load the main.php file, which will hold your main page.
    TG

    TG, shame on you: “not stable at all” 😉 There was a brief couple of hours there when a change caused an inability to log in but that was fixed quickly. It is, and has been, pretty stable, though not very static (otherwise it would not be in alpha-4).
    But the caveats to using anything in alpha should be well taken.

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Permalink Help?’ is closed to new replies.