WordPress.org

Support

Support » Themes and Templates » [Resolved] Unlink Category Parent

[Resolved] Unlink Category Parent

  • delete
    Member

    @twofivethreetwo

    I have a client who wants to unlink the Category Parent and have only the ‘childs’ as linked, what is the easiest/fastest way? I’m find with editing core files if needed.

Viewing 2 replies - 1 through 2 (of 2 total)
  • delete
    Member

    @twofivethreetwo

    I was able to find the category link code. For others it can be found in ./wp-includes/classes.php

    Starts around line 637. I just added an if statement for $category->parent and removed all the link tags. Basically just set it to $link = $cat_name;

    diablo829
    Member

    @diablo829

    Bumping this up because I can’t get this to work. I have some parent pages that have sub pages and some parent pages that do not have sub pages. For those parent pages with sub pages I do not want the parent page to be “clickable” or go anywhere. I only want the sub pages in the drop down to click to a page.

    Any advice?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Unlink Category Parent’ is closed to new replies.