Reputation Activity
-
buytytus reacted to teodora in Single category PROBLEMS!This should output the category title
<h1><?php single_cat_title(); ?></h1> If you add it just after this line <div id="content"> ?
-
buytytus reacted to Jane B in Single category PROBLEMS!If you copy those lines into the archive.php and look at another category that isn't "shoes" so won't be using the category-shoes.php is that along the lines you wanted?
-
buytytus reacted to Jane B in Single category PROBLEMS!Oh that's a shame. What I was doing was just using editing the archive.php (in the real world I might use a child theme), which should add the category name to all category archives, so I guess your category-shoes.php will override that.
Annoying when there is one little thing that isn't quite right, but I suppose you get to the stage where it just isn't worth spending any more time on it.
-
buytytus reacted to Jane B in Single category PROBLEMS!OK, well this is kind of a case of the blind leading the blind, as my Nan used to say; I have only a fraction of the WordPress knowledge that Theodora has. But anyway, as a bit of a hack by copying some of the code from the Circumference lite theme, I think I've got it to do what you want in a test local installation on my PC.
I think you are saying that your archive pages look like this: http://demo.alienwp.com/origin/category/articles/ which is almost exactly what you want except you want a title to appear as it does here: http://demo.alienwp.com/origin/archives/
I have copied these lines of code
<header class="page-header"> <h1 class="page-title"> <?php if ( is_category() ) : single_cat_title(); endif; ?></h1><?php // Show an optional term description. $term_description = term_description(); if ( ! empty( $term_description ) ) : printf( '<div class="taxonomy-description">%s</div>', $term_description ); endif; ?> </header> and put them under the line
get_header(); // Loads the header.php template. ?> in archives.php
You could leave out the optional term description but that does seem to work if I edit the category to add a description.
As I said, it's a total hack and I don't know what the repercussions might be. I haven't tested to see if anything else breaks.
-
buytytus reacted to teodora in Single category PROBLEMS!You can create your own category page. For example if your category ID is 88, you need to create a file called category-88.php.
More info in the codex http://codex.wordpress.org/Template_Hierarchy#Category_display
I would copy index.php and rename it category-YOUR-ID.php, so you have a starter category template that looks like your index and you can take it from there and edit if needed.
Hope that helps
-
buytytus reacted to Jane B in Single category PROBLEMS!The Circumference them has this in its archive.php
<header class="page-header"> <h1 class="page-title"> <?php if ( is_category() ) : single_cat_title(); elseif ( is_tag() ) : single_tag_title(); elseif ( is_author() ) : printf( __( 'Articles by %s', 'circumference-lite' ), '<span class="vcard">' . get_the_author() . '</span>' ); elseif ( is_day() ) : printf( __( 'Articles from %s', 'circumference-lite' ), '<span>' . get_the_date() . '</span>' ); elseif ( is_month() ) : printf( __( 'Articles from %s', 'circumference-lite' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'circumference-lite' ) ) . '</span>' ); elseif ( is_year() ) : printf( __( 'Articles from %s', 'circumference-lite' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'circumference-lite' ) ) . '</span>' ); elseif ( is_tax( 'post_format', 'post-format-aside' ) ) : _e( 'Asides', 'circumference-lite' ); elseif ( is_tax( 'post_format', 'post-format-gallery' ) ) : _e( 'Galleries', 'circumference-lite'); elseif ( is_tax( 'post_format', 'post-format-image' ) ) : _e( 'Images', 'circumference-lite'); elseif ( is_tax( 'post_format', 'post-format-video' ) ) : _e( 'Videos', 'circumference-lite' ); elseif ( is_tax( 'post_format', 'post-format-quote' ) ) : _e( 'Quotes', 'circumference-lite' ); elseif ( is_tax( 'post_format', 'post-format-link' ) ) : _e( 'Links', 'circumference-lite' ); elseif ( is_tax( 'post_format', 'post-format-status' ) ) : _e( 'Statuses', 'circumference-lite' ); elseif ( is_tax( 'post_format', 'post-format-audio' ) ) : _e( 'Audios', 'circumference-lite' ); elseif ( is_tax( 'post_format', 'post-format-chat' ) ) : _e( 'Chats', 'circumference-lite' ); else : _e( 'Archives', 'circumference-lite' ); endif; ?> </h1> <?php // Show an optional term description. $term_description = term_description(); if ( ! empty( $term_description ) ) : printf( '<div class="taxonomy-description">%s</div>', $term_description ); endif; ?> </header> -
buytytus reacted to Jane B in Single category PROBLEMS!This is a bit beyond me tbh. I'd probably cheat and go with a theme that already has an archive page that looks like I wanted.
I've been using this theme which I think may be along those lines - but that probably doesn't help you: http://demo.styledthemes.com/circumference-lite/?cat=7
You say you've made a template. Perhaps you can edit whatever template your archives are using, or do it with an archive template in a child theme. I've tried to see what template a different theme that I happen to have open uses for archives and I think that one may be using page-search.php but I expect it varies depending on the theme. The Circumference theme has an archive.php
I'm floundering here.... someone else needs to help
-
buytytus reacted to Jane B in Single category PROBLEMS!Do you have a link to your site to show us what you mean?
Also, does it help to put something in the category description - i.e. put the title you want in the description? That may be a red herring.
-
buytytus reacted to teodora in Is this possible?Better option would be just to copy your parent theme's index.php to your child theme. Child's index.php is supposed to override the parent's index.php. Then place the code in child's index.php where you want it to appear
-
buytytus reacted to teodora in Is this possible?I assume, this is WP? If so, on top of my head:
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; if( is_front_page() && $paged == 1 ) { ?> <div> <iframe width="640" height="360" src="//www.youtube.com/embed/oCQ3weRdo" frameborder="0" allowfullscreen></iframe> </div> <?php } ?> Hope that helps
-
buytytus reacted to Fuzzy Logic in Is this possible?- oops Teodora beat me to it
-
buytytus reacted to Wynn in YOU are the answer!Forget the button..
<i class="fa fa-volume-up" onclick="document.getElementById('non').play()"></i> You may want to add this in your CSS to show that it's clickable
i.fa-volume-up { cursor: pointer; }
-
buytytus reacted to Wynn in YOU are the answer!Sure, its the onclick="document.getElementById('someID').play()" that'll make it work.
-
buytytus reacted to BlueDreamer in Do YOU know?Welcome to the forums.
I'd say they are all custom built...