Support » Theme: Mantra » [Theme: Mantra] Page template-how to use?

  • Resolved jtlepage

    (@jtlepage)


    I’m new to WordPress. Mantra has a page template choice “Page with Intro” which I think is set up to do just what I want but I don’t know how to use it. Do I have to edit the *.php?
    The file says:

    // replace $slub with get_the_title() in the line below if you want to get posts based
    // on category name instead of slug ?>
    <?php
    $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1;
    query_posts(‘category_name=’.slug.’ &post_status=publish,…

    I want to show all posts for a certain category ‘choir’ on the page with static information at the top, everything I’ve tried yields all posts, not just the cat=choir posts. Can you tell me how to use this template? And, if I need to edit it what should it say? THX! http://www.hanfordmusic.org/wp/?page_id=174

    http://wordpress.org/extend/themes/mantra/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter jtlepage

    (@jtlepage)

    I was able to resolve this issue myself. I was making it more complicated than necessary. Great theme!

    How did you resolve it. I’ve been stuck for 2 days now.

    Thread Starter jtlepage

    (@jtlepage)

    Go to Appearance/editor and edit that file. Here’s a snippet of the code, change that last $slug to
    the category name you are trying to load on your page. (note, another mantra user said she got hers to work without editing the php, but I haven’t been able to.)

    // replace $slub with get_the_title() in the line below if you want to get posts based
    // on category name instead of slug ?>
    <?php
    $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1;
    query_posts(‘category_name=’.$slug.

    You’ll want to use a child theme or backup your edited file so that you don’t lose that change with theme updates.

    Thread Starter jtlepage

    (@jtlepage)

    whoops, I mean edit the page-with-intro.php file.

    Theme Author CryoutCreations

    (@cryout-creations)

    You don’t have to edit any files. Just create a page that has the same name as the category and that category’s posts will be loaded into the page. Give it a try 😉

    Thread Starter jtlepage

    (@jtlepage)

    That’s how I thought it was supposed to work but I couldn’t get it to work like that. Do you think it makes a difference if I created my site on a WAMP server and imported it? Do you have to create the category before the page? There must be some nuance that I didn’t get quite right. I’m struggling with it on another WAMP site now.
    http://www.hanfordmusic.org/wp/?page_id=349

    Thread Starter jtlepage

    (@jtlepage)

    In case anyone is interested, for me at least, I had to change the permalinks settings from the default to the month and name (or any choice w/ name) setting. Then the page-with-intro template worked like a charm!

    I made sure my slugs were the same, but only the newest post is visible. Can’t I link a menu item to the category page url?

    Thread Starter jtlepage

    (@jtlepage)

    Zandah, you certainly can make a menu item a category. Do that under “Appearance/menus”

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Theme: Mantra] Page template-how to use?’ is closed to new replies.