Category Descriptions and List

Post Reply
Mark
Ssr. Bludit
Posts: 26
Joined: Sun Oct 08, 2017 4:01 pm

<mediumish theme>
I noticed it is possible to enter a description in a category. How is this displayed on the website? When I navigate to a category webpage I assumed I would able to see the description right under the category title. This would also be very helpful in all the corresponding meta data.

I would also like to be able to display the categories in the footer or sidebar of the theme.

Maybe just point me to the documentation for the theme?

Thanks in advance.
User avatar
bayerberg
Master Bludit
Posts: 141
Joined: Wed Jun 07, 2017 1:05 pm
Location: London, UK
Has thanked: 7 times
Been thanked: 10 times
Contact:

if you want to display that info in your page.php try something like

Code: Select all

  $categoryKey = $page->categoryKey();
  $category = getCategory($categoryKey);
  echo '<h2>' . $category->name(). '</h2>';
  echo '<h4>' . $category->description(). '</h4>';
bludit plugins and themes - makeitblu | I do things, check them out on behance and dribbble.
Mark
Ssr. Bludit
Posts: 26
Joined: Sun Oct 08, 2017 4:01 pm

Thank you for your help! I am going to mess around with this. It appears I will have to make another template or make a if/then argument. I don't know how to do that but I will play with it and see if I can make that happen.

Something like this

Code: Select all

<!-- Begin Tags -->
			<?php if (!empty($page->tags(true))): ?>
			<div class="after-post-tags">
				<ul class="tags">
					<?php foreach ($page->tags(true) as $tagKey=>$tagName): ?>
					<li><a href="<?php echo DOMAIN_TAGS.$tagKey ?>"><?php echo $tagName; ?></a></li>
					<?php endforeach ?>
				</ul>
			</div>
			<?php endif; ?>
Post Reply