Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Possible solution:

    This happened to me yesterday, after I changed the Blog URL in the WP Settings, from “domain.com/” to “domain.com/index.php”.

    I did this hoping I could put the blog on the live server while keeping a static index.html there as we roll out changes to the blog. Any links in WP point to /?p=x which pointed to my static html page rather than to the blog’s index.php.

    What I didn’t know is that changing the blog URL affects the URL of the dashboard pages as well. So in effect, I locked myself out of the admin area!

    I was able to go to the mysql server and figure out where the blog URL value was stored and edited it back to just “domain.com/”. I WAS LUCKY that I had the access to the mysql server. My domain for this project is on Dreamhost.

    Hope this helps.
    STAN

    ddaniel, have you figured this out? I’m running into the same issue.

    Thread Starter stanleydankoski

    (@stanleydankoski)

    Ah. Finally found the answer, testing for subpages.

    Thread Starter stanleydankoski

    (@stanleydankoski)

    This is the code to help you figure out where I’m coming from:

    if (is_page()) {
            // we're looking at a static page.  Which one?
            if (is_page('2')) {		// About Us page.
                 echo "<ul style='margin-bottom: 0px;'>";
    			    wp_list_pages('title_li=&include=2&sort_column=menu_order&depth=2&child_of=0');
    			 echo "</ul>";
            } elseif (is_page('60')) {		// Menu/Wine List page.
                 echo "<ul style='margin-bottom: 0px;'>";
    			    wp_list_pages('title_li=&include=60&sort_column=menu_order&depth=1&child_of=0');
    			 echo "</ul>";
            } elseif (is_page('44')) {		// Private Dining page.
                 echo "<ul style='margin-bottom: 0px;'>";
    			    wp_list_pages('title_li=&include=44&sort_column=menu_order&depth=1&child_of=0');
    			 echo "</ul>";
            } elseif (is_page('26')) {		// Contact Us page.
                 echo "<ul style='margin-bottom: 0px;'>";
    			    wp_list_pages('title_li=&include=26&sort_column=menu_order&depth=1&child_of=0');
    			 echo "</ul>";
            } else {
                  // catch-all for other pages
                  //echo "<p>Vote for Pedro!</p>";
            }
    
    		// for ALL pages
    
    			if($post->post_parent)
    			$children = wp_list_pages("title_li=&child_of=" . $post->post_parent."&echo=0");
    			else
    			$children = wp_list_pages("title_li=&child_of=" . $post->ID."&echo=0");
    			if ($children) {
    				echo "<ul style='margin-top: 0px;'>";
    				echo $children;
    				echo "</ul>";
    			}
    }
Viewing 4 replies - 1 through 4 (of 4 total)