Category Descriptions and List

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

Wed Feb 27, 2019 3:17 am

<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
Master Bludit
Posts: 99
Joined: Wed Jun 07, 2017 1:05 pm

Wed Feb 27, 2019 2:32 pm

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 | check out startups undiluted - london's startup ecosystem
Ssr. Bludit
Posts: 24
Joined: Sun Oct 08, 2017 4:01 pm

Thu Feb 28, 2019 2:12 am

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 ?>
			<?php endif; ?>
Post Reply