Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Permalinks problem causes pages to load as home

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #35831
    KelvinAlf
    Member

    Hi first off I want to thank Chris for teaching me how to make a WordPress theme through Lynda.com and a part of my CSS knowledge through all his sites also. I have a two part problem in which I think one causes the other.

    Back story that I think might be relevant to the matter:
    This is on a site that we switched servers on. The old server was a windows (please don’t laugh) and we got a Linux one and restored posts and content from the back up files. The way the site files are set up is that the site URL and WordPress URL are different. The WordPress files are in a sub-directory and a copy of the index.php is in the root along with the lone .htaccess file (index does point to the copy in the sub-directory). The site is currently in maintenance mode.

    Problems:

    1. When after editing or creating a new page, if you go to any page it shows loads the home template file instead of the page file. (url still points to example.com/page/) Posts load perfectly. To temporarily fix this I reset the permalink to the default than to the “pretty” version which I rather keep for obvious seo and just user experience reasons.
    2. The custom menus works perfectly on pages and posts but on the home page the two custom menus load ALL pages in alphabetical order except for the addition of the Home link which isn’t coded into anywhere but is included in the custom menu.

    I’ve literally spent the last three days and nights up to 4-6am on this, researching, trying, apply methods that all haven’t worked. I’ve called GoDaddy multiple times and the most help I received was them telling me that everything is set up the way it should be on their end. I love their laissez faire methods of custom service. If anyone knows anything that can help I would greatly appreciate your thoughts. I think I’ll go code a print stylesheet and call it a night. Thank you.

    **EDIT**
    If anyone has these problems it might derive from a function for custom post-types to show on the homepage. Below is the working version from Justin Tadlock

    add_filter( ‘pre_get_posts’, ‘my_get_posts’ );

    function my_get_posts( $query ) {

    if ( is_home() && false == $query->query_vars )
    $query->set( ‘post_type’, array( ‘post’, ‘page’, ‘album’, ‘movie’, ‘quote’, ‘attachment’ ) );

    return $query;
    }
    #93422
    TheDoc
    Member

    Well, GoDaddy is certainly a problem. I’ve had some crazy issues with their hosting. If possible, I’d try changing hosts (not that you want to go through another server switch!).

    I’ll give the rest of the problems an extra think!

    #100422
    KelvinAlf
    Member

    I found out what it was, a messed up function in my functions.php that was meant to show custom post types. Fixed it but thank you!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Back End’ is closed to new topics and replies.