Jump to content


Photo
- - - - -

Category Page using Highlight Page-Standard Template


This topic has been archived. This means that you cannot reply to this topic.
14 replies to this topic

#1 wjs04

wjs04

    Member

  • Members
  • PipPip
  • 11 posts

Posted 01 March 2010 - 03:44 PM

Hey...I'm using the StationPro theme and was wondering if there was a way to set up a category page similar to the Highlight Page Template. I like the highlight feature header look and would like to have the post excerpts in the content area. sharpewings Thanks

#2 jnoh

jnoh

    Advocate

  • Members
  • PipPipPipPipPip
  • 502 posts

Posted 02 March 2010 - 02:26 AM

Hey wjs04. This will require a bit of customizing. Did you want all your categories to display a highlight page template?

#3 wjs04

wjs04

    Member

  • Members
  • PipPip
  • 11 posts

Posted 02 March 2010 - 01:52 PM

Yes...just having a single highlight box with the featuremedia, featuretext, and the featuretitle option. It would only show on the main category pages. It would also be the same size as the hightlight boxes under the page options. If I could just push the blog content excerpts and the sidebar widgets down and insert the highlight feature box. Would something like this be alot of customizing?

#4 jnoh

jnoh

    Advocate

  • Members
  • PipPipPipPipPip
  • 502 posts

Posted 02 March 2010 - 10:03 PM

Would you want to be able to customized the text for each category highlight section?

#5 wjs04

wjs04

    Member

  • Members
  • PipPip
  • 11 posts

Posted 03 March 2010 - 02:30 AM

Yes...I wanted to basically highlight the posts that are under the particular category.

#6 jnoh

jnoh

    Advocate

  • Members
  • PipPipPipPipPip
  • 502 posts

Posted 03 March 2010 - 11:53 PM

Okay we're going to want to splice the highlight template (page-highlight.php) with the index.php file. Create a file called page-category.php and add this code: `
ID, 'category', true)); ?>
` Now you should be able to create a page using the template we just created. Set a custom field "category" to the category slug to specify which category to draw posts from.

#7 wjs04

wjs04

    Member

  • Members
  • PipPip
  • 11 posts

Posted 04 March 2010 - 02:23 PM

Thanks jnoh...

I tried out the code as noted above and could not get anything to work. When I create the page I get the message below.

Parse error: syntax error, unexpected '<' in /home4/wjswings/public_html/wp-content/themes/StationPro/page-category.php on line 9

The code below it is what is in the page-category.php.

 <?php
	if(VPRO) {
	/*
		Template Name: Highlight - Category Posts - Page
	*/
		get_header();
			require(LIB.'/_subhead.php');
			require(PRO.'/template_highlight.php');
	<div id="content" class="fix">
		<div id="maincontent" role="main">
			<?php query_posts('category_name=' . get_post_meta($post->ID, 'category', true)); ?>
				<?php include (LIB . '/_posts.php'); ?>
		</div>
		<?php get_sidebar();?>
	</div>
	<?php get_footer(); ?>

I don't know if it is something in your last paragraph I left out.

Now you should be able to create a page using the template we just created. Set a custom field "category" to the category slug to specify which category to draw posts from.

I'll keep working on it.

Thanks

#8 jnoh

jnoh

    Advocate

  • Members
  • PipPipPipPipPip
  • 502 posts

Posted 05 March 2010 - 12:46 AM

*****OOOPS***** try this: `
ID, 'category', true)); ?>
`

#9 wjs04

wjs04

    Member

  • Members
  • PipPip
  • 11 posts

Posted 05 March 2010 - 04:40 PM

jnoh...still no luck. I'm going to put this on hold temporarily until I can get a better understanding on PHP. I keep getting a parse error. I was looking through the forum and it seemed like someone with the iblog theme is trying to do the same thing. I'll keep working on it. More options for the Category Page seem to be in high demand with both the StationPro and iBlog theme. Thanks again!

#10 wjs04

wjs04

    Member

  • Members
  • PipPip
  • 11 posts

Posted 05 March 2010 - 05:47 PM

This is an example of a main category page, when selected. A highlight box (at the top) is added to the page. When you select a post to read, it simply goes to the post page, just a normal page.

I decided to add the pic, because I wasn't sure if I described correctly what it was I was after.

Posted Image

#11 jnoh

jnoh

    Advocate

  • Members
  • PipPipPipPipPip
  • 502 posts

Posted 06 March 2010 - 02:19 AM

Ohh, gotya. Also what is the parse error that you're getting?

#12 wjs04

wjs04

    Member

  • Members
  • PipPip
  • 11 posts

Posted 09 March 2010 - 02:46 PM

First code given: Parse error: syntax error, unexpected '<' in /home4/wjswings/public_html/wp-content/themes/StationPro/page-category.php on line 9 Second code given: Parse error: syntax error, unexpected $end in /home4/wjswings/public_html/wp-content/themes/StationPro/page-category.php on line 16 The picture in the last post was made by using the Highlight Page - Standard Template. I then went to the wing category and cut out the content area and pasted it into the Highlight Page content area.

#13 arpowers

arpowers

    Founder

  • Administrators
  • 3270 posts

Posted 10 March 2010 - 06:27 PM

looks like there is a syntax error in your code. You created a new template correct?

#14 wjs04

wjs04

    Member

  • Members
  • PipPip
  • 11 posts

Posted 11 March 2010 - 02:57 PM

Andrew...I did create a new PHP template like jnoh asked. The parse error's are from viewing the new pages. I was hoping to be able to click on a Category page and have it look like the full page image posted earlier. The highlight feature area (outlined in red) is what I want to add to the Category page. I know this is modification outside the purchased package, but I didn't know how difficult it would be or if it was even possible.

#15 arpowers

arpowers

    Founder

  • Administrators
  • 3270 posts

Posted 11 March 2010 - 07:14 PM

I think you should just call this page "category.php" and WP will auto-recognize it. What you're doing should work though.. you've probably forgotten to close a php tag or if/else statement... Pay attention to the errors you're getting and you should find it. are you running a local server? (WAMP, MAMP, LAMP, etc..) also read this: http://codex.wordpre...egory_Templates its how you're supposed to do this category page.