1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Issues with custom Wordpress theme...

Discussion in 'WordPress' started by HUMMIKE, Oct 17, 2011.

  1. #1
    Hi All,

    I've just begun exploring Wordpress as a CMS for a simple 2-column website. I've had success establishing page templates for my static pages. My problem comes when I try to integrate a blog into one of my pages. Under Settings>Reading, I've set my custom blog page (blog.php) to be the page which displays my posts, however clicking 'blog' in my main navigation menu still opens the index.php page. I've checked this by inserting a lorem ipsum paragraph into the index.php page. Can anyone lead me to a good source which will walk me through setting up this page? I'm in the process of reading through all the WP codex articles, but some are a little tough as I only have basic understanding of PHP. I simply want to have a normal WP blog but integrated into my template structure. You can see the theme under construction at thenally.com/wordpress. Any direction would be really appreciated!

    Cheers!

    EDIT:

    After working on it for a few more hours, I've managed to get the blog page to display within the desired template (used a few div tags in the index.php file) but I still am not sure what to do to override the index.php file with my blog.php file. Maybe it isn't necessary, but I'm interested to hear why anyways. The Settings>Reading posts page is still set to 'Blog'...?
     
    Last edited: Oct 17, 2011
    HUMMIKE, Oct 17, 2011 IP
  2. twowebros

    twowebros Active Member

    Messages:
    42
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    93
    #2
    Hi,

    when you select a page in Settings>Reading as a post page. it automatic calls index.php this is a default wordpress functionality.
    and if you choose a page as a front page it will automaticaly calls page.php.

    thanks
    2webrosTeam
     
    twowebros, Oct 19, 2011 IP
  3. HUMMIKE

    HUMMIKE Member

    Messages:
    42
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #3
    Hi,

    Thanks a lot for the reply. That makes complete sense to me. Therefore in order to display my blog, would you recommend a) editing the index.php file directly, or b) not specifying a page under settings>reading and adding the loop into my blog.php file? Would that work? I suppose the same question applies to the front page.

    Thanks for your time!
     
    HUMMIKE, Oct 19, 2011 IP
  4. twowebros

    twowebros Active Member

    Messages:
    42
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    93
    #4
    you should create a page named as blog or some thing else you like in your admin and select that aas a post page.
    now you edit your index.php and the loop.php is already included in it.

    thanks
    2webrosTeam
     
    twowebros, Oct 19, 2011 IP
    HUMMIKE likes this.
  5. HUMMIKE

    HUMMIKE Member

    Messages:
    42
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #5
    Thats all i needed to know. Thanks so much for the help.

    Cheers!
     
    HUMMIKE, Oct 19, 2011 IP
  6. twowebros

    twowebros Active Member

    Messages:
    42
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    93
    #6
    ur welcome cheers :)
     
    twowebros, Oct 19, 2011 IP