New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Category Pages #220

Closed
daviddarnes opened this Issue Feb 25, 2013 · 7 comments

Comments

Projects
None yet
3 participants
@daviddarnes
Member

daviddarnes commented Feb 25, 2013

Either I wasn't patient on the docs or there's no real way to layout the categories page?

An if_categories() would be useful, but would it be too much if there was a categories.php ? Just a thought.

@rwarasaurus

This comment has been minimized.

Show comment
Hide comment
@rwarasaurus

rwarasaurus Feb 25, 2013

Member

Not sure I understand what you mean. Like wordpress categories?

Member

rwarasaurus commented Feb 25, 2013

Not sure I understand what you mean. Like wordpress categories?

@daviddarnes

This comment has been minimized.

Show comment
Hide comment
@daviddarnes

daviddarnes Feb 25, 2013

Member

Yea, was trying to avoid saying that as I don't like comparing the two. The main reason I asked is because I've just had some trouble just putting the title of the category at the top of the category page.

Member

daviddarnes commented Feb 25, 2013

Yea, was trying to avoid saying that as I don't like comparing the two. The main reason I asked is because I've just had some trouble just putting the title of the category at the top of the category page.

@rwarasaurus

This comment has been minimized.

Show comment
Hide comment
@rwarasaurus

rwarasaurus Mar 15, 2013

Member

This can be implemented as a plugin in 1.0 :)

Member

rwarasaurus commented Mar 15, 2013

This can be implemented as a plugin in 1.0 :)

@daviddarnes

This comment has been minimized.

Show comment
Hide comment
@daviddarnes

daviddarnes Mar 15, 2013

Member

A plugin for one helper? Seems a bit overkill.

Member

daviddarnes commented Mar 15, 2013

A plugin for one helper? Seems a bit overkill.

@oilvier

This comment has been minimized.

Show comment
Hide comment
@oilvier

oilvier May 23, 2013

@daviddarnes said "I've just had some trouble just putting the title of the category at the top of the category page."

Hi,
Have you managed to do it ? I'm need the same feature and can't seem to get it working...

oilvier commented May 23, 2013

@daviddarnes said "I've just had some trouble just putting the title of the category at the top of the category page."

Hi,
Have you managed to do it ? I'm need the same feature and can't seem to get it working...

@daviddarnes

This comment has been minimized.

Show comment
Hide comment
@daviddarnes

daviddarnes May 23, 2013

Member

@oilvier Probably the worst way to do it, but didn't see any other choice:

<?php if(strstr(current_url(), "category")) : ?>
    <div class="category name">
        <?php
            $strings = array("category/", "-");
            $replacments = array("", " ");
            $category = str_replace($strings, $replacments, current_url());
        ?>
        <h1><?php echo trim(ucwords($category), '/0123456789'); ?></h1>
    </div>
    <?php else: ?>
    <div class="postspage name">
        <h1><?php echo page_title(); ?></h1>
    </div>
<?php endif; ?>
Member

daviddarnes commented May 23, 2013

@oilvier Probably the worst way to do it, but didn't see any other choice:

<?php if(strstr(current_url(), "category")) : ?>
    <div class="category name">
        <?php
            $strings = array("category/", "-");
            $replacments = array("", " ");
            $category = str_replace($strings, $replacments, current_url());
        ?>
        <h1><?php echo trim(ucwords($category), '/0123456789'); ?></h1>
    </div>
    <?php else: ?>
    <div class="postspage name">
        <h1><?php echo page_title(); ?></h1>
    </div>
<?php endif; ?>
@oilvier

This comment has been minimized.

Show comment
Hide comment
@oilvier

oilvier May 24, 2013

Well, it works at least ! (I was far from something functional)

Many thanks to you !

oilvier commented May 24, 2013

Well, it works at least ! (I was far from something functional)

Many thanks to you !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment