WordPress.org

Ready to get started?Download WordPress

Forums

Static "like" pages (4 posts)

  1. mtanner
    Member
    Posted 10 years ago #

    Question to clarify including/excluding categories.
    I was reading This Post regarding including/excluding categories from being seen. I was wondering if any other users may be using this method to make a static like templated pages OR is there a better way?
    Example on my page I have a section called "bio" this information will pretty much remain the same. So what I did was copy my index.php template save it as bio.php and add the following
    ?php /* Don't remove these lines, they call the b2 function files ! */
    $blog = 1;
    $cat="3";
    require_once('blog.header.php');
    and in my index.php file i excluded the bio cat 3 with $cat="-3"; and added a link to the bio.php file
    I guess my question is... is this a good wp way to do this or has someone found a better way?
    you can see sample here using the "bio" link Still Tweeking so Ignore post

  2. tcervo
    Member
    Posted 10 years ago #

    mtanner,
    I also started with the separate about.php page route (see this thread). All of my links were working fine, except the categories, which were pointing to about.php instead of index.php. I solved this like so:
    <?php list_cats(0, 'All', 'name', 'asc', 'index.php',true,0,1,1); ?>
    That tells the category links to use index.php instead of the current page and simply tacking on the extra URL parameters.
    Ultimately, though, I created a new category then excluded it on the main template using:
    if (empty($cat))
    $cat = -14;
    Then linked to the about page using:
    About
    The only problem is the About category still shows up on the category list...so I'm in the same boat as you, looking for a way to exclude a particular category from showing up in the category list. It would be nice if we could manage categories the same (or similar) way as managing links: have a Visible Y/N column for each category so we could filter out those that we don't want displayed (like the aforementioned About category...)
    -Tony

  3. tcervo
    Member
    Posted 10 years ago #

    Oops, sorry...my link example created an actual link (as well it should...) Here's what was meant:
    ...
    Then linked to the about page using:

    -Tony

  4. sportbiker
    Member
    Posted 9 years ago #

    I copied index.php, by trial and error stripped out the code that prints the blog entries themselves and the menu down the right, then manually added HTML code to create my bio page. I renamed it "mark-bio.php" and created a link to it using the WP interface.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.