WordPress.org

Ready to get started?Download WordPress

Forums

Can I make a page not clickable? (8 posts)

  1. ny888
    Member
    Posted 7 years ago #

    I created a page with no content and it's really only used as a parent page.

    Is there a way to make it not clickable on my sidebar or did I go about this the wrong way to begin with?

  2. Ryan Fitzer
    Member
    Posted 7 years ago #

    Could you specify exactly what functionality you are looking for? There my be a better way to take care of your needs. I don't quite understand why you would need a page to not be linked.

  3. Chris_K
    Member
    Posted 7 years ago #

    You might look at the codex. For instance, if your theme is using wp_list_pages(), there's an "exclude" option that you could use to not show that page in any page lists.

    http://codex.wordpress.org/Template_Tags/wp_list_pages

  4. ny888
    Member
    Posted 7 years ago #

    On my navigation sidebar I have a list of page links. When you create a page you can define a page parent and then it displays indented to the page parent.

    I like this look, I guess you can call it a page subcategory. I would like the parent page to just be text and not a link to anything.

    Example:

    >Trips
    >>USA
    >>Asia
    >>Europe

    Perhaps there's a plugin that will allow me to do this.

  5. Chris_K
    Member
    Posted 7 years ago #

    So you don't want "trips" (in the above example) to be a link?

    How about scrapping the WP tag that dynamically builds that list and putting in your own "hand-crafted" unordered instead?

  6. ny888
    Member
    Posted 7 years ago #

    I guess I can try that, it's just that I'm just getting started with php.

  7. Chris_K
    Member
    Posted 7 years ago #

    Well good news. My idea only needs the ability to build a list (<ul> and <li> tags) and hyperlinks. :-) Basic HTML for the win!

    You'll see (probably in your theme's sidebar.php) a WordPress Template tag that generates that page list (probably wp_list_pages() as linked earlier in this thread).

    Make a copy of sidebar.php before you start hacking it up...

    Remove that tag and insert your own list.

    Bonus Tip
    Because I'm a sharer, I'll toss a little tip at ya here... Before you change anything, browse to your blog the way it currently is.
    View Source.
    Find the page list.
    Copy / Paste to sidebar as mentioned above.
    Remove hyperlink around "trips"

    Cool, huh?

  8. ny888
    Member
    Posted 7 years ago #

    Handysolo,

    That's cheating, but I like it. :)

Topic Closed

This topic has been closed to new replies.

About this Topic