WordPress.org

Ready to get started?Download WordPress

Forums

Categories in a PHP include (3 posts)

  1. Zahra
    Member
    Posted 10 years ago #

    Hi - I was wondering if anyone knows if it's possible to link to a page where one weblog category would be displayed as a PHP include. I tried this <? include("wp/index.php?cat=2"); ?> which obviously didn't work, so does anyone know of another way?

  2. tcervo
    Member
    Posted 10 years ago #

    Zahra,
    I'm not sure I understand what you're trying to do...Is this page going to exist somewhere outside your normal blog? Perhaps using a different template?
    You could put the following at the top of the page:
    just under $blog = 1;
    $cat = 2; // add this line
    Not sure if that's what you're looking for, though...
    -Tony

  3. Zahra
    Member
    Posted 10 years ago #

    I'm not sure either. :/ Basically i'm using a php include to display my blog on my site: <? inclue("wp/index.php"); ?>. I'm trying to make a link to a page that will display a category of my blog with an include, if possible. I'll try that, though.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.