• Resolved viltnieks

    (@viltnieks)


    Hi,

    I’m using WP as a CMS I had just static pages, but I wanted to add a blog section in my site. I wanted to for blog to be located here, like this:

    page | page | page | blog

    So I changed code in header.php

    from this:

    <div id="topMenu">
      <ul class="sf-menu">
    	<?php wp_list_pages('hide_empty=1&exclude=1&title_li='); ?>
      </ul>
    </div>

    to this:

    <div id="topMenu">
      <ul class="sf-menu">
    	<?php wp_list_pages('hide_empty=1&exclude=1&title_li='); ?>
         <?php wp_list_categories('hide_empty=1&exclude=1&title_li='); ?>
       </ul>
    </div>

    I created category named “IT Blogs” and 1 post for testing purposes.

    At first everything seemed fine, when I pressed IT Blogs a blog page opened with my test post inside of it.

    The problem is that when pressing on blog’s title I get reddirected to one of my pages (but without images).
    When previewing post from admin panel same thing happens.

    There is no way to leave a comment for this post

    when pressing on comments I also get reddirected to one of my pages.

    Link to blog

Viewing 14 replies - 1 through 14 (of 14 total)
  • Moderator James Huff

    (@macmanx)

    I doesn’t look like the permalink settings were updated correctly. Go back to Settings/Permalinks in your admin area and set your permalink structure again. See this for more info:

    http://codex.wordpress.org/Using_Permalinks

    Thread Starter viltnieks

    (@viltnieks)

    I’ve read about permalinks, I think the problem is that I use %pagename% permalink for my pages, and that blog can’t understand that.

    Is it possible to use two different types of permalinks ?

    edit:

    I’ve tried using /%category%/%postname%/ and the blog works great now, but there is a small problem with pages at the moment.

    Before using this permalink I had this in address bar:

    page.com/pagename

    now I have this

    page.com/pagename/

    And also images aren’t displayed in some pagees. What could be the problem here ?

    Moderator James Huff

    (@macmanx)

    Post names and page names are actually the same thing when permalinks are concerned, so %postname% should be what you want.

    page.com/pagename/ is the correct format with the trailing slash. There really is no difference between the two, but WordPress prefers to have the trailing slash.

    As for the images not displaying in some pages, could you provide a link to the specific pages?

    Thread Starter viltnieks

    (@viltnieks)

    I’ve resolved problem with images.

    One last thing about permalinks,

    Using /%category%/%postname%/ is the closest I’ve got to my desired result.

    only problem is that when using this permalink, when I click on blog this is displayed in address bar: site.com/category/blogname/ where I wan’t for it do display site.com/blogname/.
    If I remove /%category%/ from permalink then I will achieve this, but when browsing to post inside that blog this is displayed: site.com/postname, but I would like this to be displayed: site.com/blogname/postname in address bar.

    esmi

    (@esmi)

    It might help if you stuck to the one topic with this question.

    http://wordpress.org/support/topic/396486?replies=3

    Thread Starter viltnieks

    (@viltnieks)

    Ok I will do so, Initially they were two different topics though. I will mark the other thread as solved.

    Thread Starter viltnieks

    (@viltnieks)

    Sorry for bumping this, but I would really appreciate some help with this 🙂

    Thread Starter viltnieks

    (@viltnieks)

    Any chance of getting this answered ?

    Moderator James Huff

    (@macmanx)

    If you want to achieve “site.com/blogname/postname”, you will need to move your blog into a directory titled “blogname” and use the /%postname%/ permalink structure.

    Thread Starter viltnieks

    (@viltnieks)

    Thank for you reply, but what if WP is used for this site and just one small section of it is blog ?

    Could you please click this link and look at the address bar (it isn’t displayed as I’d like there), then click on post title and then have a look at address bar(it is displayed as I’d like there).

    Moderator James Huff

    (@macmanx)

    That’s functioning correctly. Unfortunately, when viewing a category, there’s no way to removed “/category/” from the permalink. It’s kind of an organizational “feature”.

    Thread Starter viltnieks

    (@viltnieks)

    So with my current setup it’s impossible to achieve what I’d like ?

    Moderator James Huff

    (@macmanx)

    I believe so. Some people can work magic with .htaccess rewrites, but what you want to do is outside of what I know.

    Thread Starter viltnieks

    (@viltnieks)

    Ok, guess I will just have to live with it.

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

The topic ‘Blog acting very weird.’ is closed to new replies.