Support » Themes and Templates » Stop a page having a URL.

  • Hi guys,

    I’ve got a one page javascript site that only has one url, domain.com/blog . As well as obviously all the blog posts having urls.

    That’s all fine, but basically what I have done is on my index.php is include pages in the page such as the following:

    <?php $recent = new WP_Query("pagename=about"); while($recent->have_posts()) : $recent->the_post();?>
           <h1><?php the_title(); ?></h1>
           <?php the_content(); ?>
    <?php endwhile; ?>

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    As this content will only be displayed on the homepage, I don’t want individual pages at all, nor for search engines to pick these up. I don’t have a navigation so that’s fine I just mean I don’t want say domain.com/about to be an available accessible url for the user, even if they type it in.

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Sorry re-reading this. The main site is at the root e.g. domain.com. Where all the pages are getting pulled in etc.

    It’s having a blog however at http://www.domain.com/blog

    Hope that makes a little more sense

    esmi

    (@esmi)

    Forum Moderator

    If you don’t display links to any of the pages, the search engines won’t pick them up or index them.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Stop a page having a URL.’ is closed to new replies.