I thought I might be able to skip through the categories within portfolio and output the titles and descriptions that way, and so started with just trying to draw them out below, but doesn’t work by the look.
<?php $categories = get_terms("portfoliocategory");
foreach ($categories as $category) {
$entrycategory = str_replace(',','',str_replace('.','',$category->name));
echo '<a class="catlink" href="#filter=.'.$entrycategory .'" rel="nofollow">'.$category->name.'</a>';
}?>
In the ror.xml file I can generate a page for the stock item, even though the page doesn’t refresh by using a url as below -
http://www.wfbruce.co.uk/portfolio/james-murray-domestic-regulator-london-c1815/ which then gives me -
<title>James Murray, Domestic Regulator, London, c1815</title>
<description>Antique Clocks &amp; Barometer Specialists | On-line Catalogue of Quality Antique Clocks including Longcase, Mantel, Lantern &amp; Wall Clocks For Sale. New Stock Added Daily.</description>
This is generated in an include with the code below -
<title><?php bloginfo( 'category' ); ?></title>
<meta name="description" content="<?php bloginfo( 'description' ); ?>" />
So I thought I could get to the categores section by using something similar such as -
http://www.wfbruce.co.uk/categories/Barometers/
But doesn’t work that way by the looks
So I think maybe using if statements is the way, and found the array that holds all the categories which is below
<?php print_r(array_values($terms)); ?>
This outputs this -
( [0] => stdClass Object ( [term_id] => 24 [name] => Archive [slug] => b-archive [term_group] => 0 [term_taxonomy_id] => 25 [taxonomy] => portfolio_categories [description] => [parent] => 0 [count] => 10 ) [1] => stdClass Object ( [term_id] => 5 [name] => Barometers [slug] => c-barometers [term_group] => 0 [term_taxonomy_id] => 5 [taxonomy] => portfolio_categories [description] => Antique Barometers East Susses, for sale and restored by WF Bruce. [parent] => 0 [count] => 8 ) [2] => stdClass Object ( [term_id] => 6 [name] => Bracket & Mantel Clocks [slug] => d-bracket-mantel-clocks [term_group] => 0 [term_taxonomy_id] => 6 [taxonomy] => portfolio_categories [description] => [parent] => 0 [count] => 6 ) [3] => stdClass Object ( [term_id] => 21 [name] => Lewes Clocks [slug] => f-lewes-clock-exhibition [term_group] => 0 [term_taxonomy_id] => 22 [taxonomy] => portfolio_categories [description] => [parent] => 0 [count] => 11 ) [4] => stdClass Object ( [term_id] => 8 [name] => Lantern Clocks [slug] => g-lantern-clocks [term_group] => 0 [term_taxonomy_id] => 8 [taxonomy] => portfolio_categories [description] => [parent] => 0 [count] => 4 ) [5] => stdClass Object ( [term_id] => 9 [name] => Longcase Clocks [slug] => h-longcase-clocks [term_group] => 0 [term_taxonomy_id] => 9 [taxonomy] => portfolio_categories [description] => [parent] => 0 [count] => 25 ) [6] => stdClass Object ( [term_id] => 25 [name] => Regulators [slug] => regulators [term_group] => 0 [term_taxonomy_id] => 26 [taxonomy] => portfolio_categories [description] => [parent] => 0 [count] => 3 ) [7] => stdClass Object ( [term_id] => 10 [name] => Wall Clocks [slug] => z-wall-clocks [term_group] => 0 [term_taxonomy_id] => 10 [taxonomy] => portfolio_categories [description] => [parent] => 0 [count] => 14 ) )
So how can I create an if statement using the above to ask something like this -
<?php if $terms == 'c-barometers' { ?>
<title> is this </title
<description>is this too </description>
That’s sort of Fred speak for what I think might work