• What I need is this:

    1. I need a index.php file, the first page you hit on my website https://www.klifix.nl/ where you can see only the feeds and other information, and in the sidebar you can see the headlines of al the posted news etc, as it is now.

    2. Then when you click one headline I need a second index.php file wich shows only that post that has been clicked on, without the information that is shown on the frontpage.

    Is that possible?

    If you don’t really understand what I mean, just take a look at this website: https://www.fok.nl/

Viewing 14 replies - 1 through 14 (of 14 total)
  • Anyone has an idea how to do this?

    Yeah, should be possible — index.php is your front page, while single.php is the page to display your posts.

    so what I have to do in the wp_index file is to link to single php instead of the index.php file which is based in my theme (benovelence)?

    No, you shouldn’t need to do that, you can just modify index.php in your theme fodler to remove posts. Make sure you save the code, though, because you’ll need to put it into sidebar.php.

    You can leave single.php unchanged ??

    I need to tell there is no single.php file in the theme folder, is that a problem. And will the news noty show up in the sidebar.php if I insert the code in there?

    I can’t look at it know as I am at work and can’t open some subsites, but I will take a look at it tonight! Thanks for helping!

    Thread Starter klifix

    (@klifix)

    I’ve added the single.php file and modified the index.php file. It works fine now, except one thing.

    When I hit a recent post it shows up via the single.php file. So far so good. But when I hit a page then the index.php file is called and there’s only the content of the indexfile instead of the pagecontent.

    How can this be solved (if you don’t understand what I mean, just take a look at my site and hit one of the pages that’s under “Specials” in the sidebar).

    please help, i’ve tried everything…

    If you mean when you hit a WordPress page, it’s because they take yet another template file called page.php. Make that file (it could even be a copy of single.php) and things should work out for you.

    perfect! Thanx very much!

    Thread Starter klifix

    (@klifix)

    Ok, it works all fine already, except just one thing:

    I’ve added the post.php and a page.php file to my theme. And so the index.php is modified to my needs.

    When I post a post in my adminpanel the post is saved but my browser doesn’t bring me back to the adminpanel, instead of that it is followed by a blank page (page cannot be found), however the new post exist.

    The full url to the 404 page is …/wp-admin/post.php, but it has to be …/wp-admin/post.php=true.

    Is that correct, and if so: how can this be solved?

    Thread Starter klifix

    (@klifix)

    someone knows how to solve this?

    Thread Starter klifix

    (@klifix)

    anyone?

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Separate index file’ is closed to new replies.