Forums

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

Home Forums Back End Automatic categories slug request in WP

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

    Hello
    i’m starting with wordpress
    i created categories-slug.php pages for each of my categories and i create the code that i put in my page.php
    Is there a way to automate the search for each page?
    Thanks in advance

    Code:
    post;
    if ( is_page(‘x’) ) {
    include(TEMPLATEPATH . ‘/categorie-slug.php’);
    }elseif ( is_page(‘y’) ) {
    include(TEMPLATEPATH . ‘/categorie-slug2.php’);
    }elseif ( is_page(‘z’) ) {
    include(TEMPLATEPATH . ‘/categorie-slug3.php’);
    } else {
    include(TEMPLATEPATH . ‘/categorie-slug4.php’);
    }
    ?>
    #72535
    TheDoc
    Member

    What do you mean "automate the search for each page"?

    #72542
    boddhi
    Member

    to automate the search for the categorie slug in the template path,
    if this category, then automaticaly search the category template in the correct path.

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