Site logo

Archived topic

on category pages: how to get a list of post titles only

5 replies · Started by Rosina on October 18, 2021

Viewing posts 1–6 of 6

Right now I'm struggling with making the category pages behave.

All I need is the Category title, followed by a list of posts or (wiki) pages. Right now I get pages of text that render the page pretty much useless. You can see here what I mean: category: characters

Any suggestions would be much appreciated.

Hi Rosina,

Do you mean to display the listing like this? - https://share.getcloudapp.com/nOu5YYPm

If so, you can modify how the post displays using Block Element - Content template.

On the layout, instead of adding anything, you can just add a GB Headline block and set its dynamic value "Post title".

You then set the display rule location to post category archives or All archives if you wish for all archives to behave the same way. :D

Yes, that's what I'm looking for. I'll follow your directions and see if I can make it come together. I have never got used to the gutenberg/block approach but I'll give it a go.

Many thanks.

Hi Elvin - Okay so, first a disclaimer: I've been using WordPress since almost the beginning. Back when things were simpler I put together dozens of small sites. However, the leap forward in complexity has caused me to retreat from fussing with WP. Also, I have this absurd compulsion to tell you that I am not dumb. Generally I can figure things out, even technical things. In fact, I have a PhD from Princeton. So you get that I am not a dilettante.

Having said all that, could you please clarify some things for me?

As I understand it,

1. the category archive page (or any archive page) is generated from archive.php

Question: I just realized I have no idea how to call up an archive page. If I wanted a monthly archive I can use a widget, but what if I want that archive on a dedicated page? I'm drawing a blank.

2. It is theoretically possible to construct a custom version of archive.php. The archive.php file that came as a part of the GP style works in the traditional way and could, in theory, be used as a base for a custom archive.pap

Question: Even if this is true and a possibility, I still have no idea how to bring an archive page into existence. Shortcode? Template? Incantation? Sacrifice to the goddess?

3. GP has put together this block generation approach which replaces the custom archive.php option -- which I have read about and can probably pull off with enough time (ha!) and concentration -- but then I'm back at square one, how to deploy an archive page. Say I get it all done following your instructions and the videos, what do I have then? And what do I do with it?

I may have to hire somebody to sort this all out for me, but if I can mange to handle it on my own, that would a good thing. A frustrating, mind boggling thing, but also a good thing.

Thanks, as ever.

For Q#1:

1. the category archive page (or any archive page) is generated from archive.php

That's correct. Themes generally have [template_part].php.

Examples:
header.php = file template for the header of the page.
content-page.php = file template for static pages.
content-single.php = file template for single post pages.
archive.php = file template for archive pages (any type of archive, i.e. category, tags, author, etc)

Here's a sample repository of files. (GeneratePress)

2. It is theoretically possible to construct a custom version of archive.php. The archive.php file that came as a part of the GP style works in the traditional way and could, in theory, be used as a base for a custom archive.pap

Question: Even if this is true and a possibility, I still have no idea how to bring an archive page into existence. Shortcode? Template? Incantation? Sacrifice to the goddess?

That's definitely possible by implementing child themes.
https://developer.wordpress.org/themes/advanced-topics/child-themes/

But it can be quite complex as it requires a bit of PHP coding.

3. GP has put together this block generation approach which replaces the custom archive.php option — which I have read about and can probably pull off with enough time (ha!) and concentration — but then I’m back at square one, how to deploy an archive page. Say I get it all done following your instructions and the videos, what do I have then? And what do I do with it?

I may have to hire somebody to sort this all out for me, but if I can mange to handle it on my own, that would a good thing. A frustrating, mind boggling thing, but also a good thing.

Block Element - Content template specifically targets the post loop. :)

The main difference/s between modifying a post loop using Block Element - Content template vs. creating a child theme template for the archive page is/are:

Block Element - Content Template doesn't require PHP coding skill because you don't need to write custom archive.php file.
Block Element - Content Template doesn't require you to upload php template files because everything is done within the UI.

Meanwhile:

Child theme template gives you full control on the complexity of the customization. Since you're coding everything within the template, you can do custom conditions or designs outside of Block Element's capabilities.

As for the deployment of Block Element - Content Template. It is automatically deployed when you save it. It is applied immediately. :)

And you can actually pick which taxonomy archive you wish to apply the Block Element - Content Template on using its Display Rule location as shown here - https://share.getcloudapp.com/ApuEyKyR

I may have to hire somebody to sort this all out for me, but if I can mange to handle it on my own, that would a good thing. A frustrating, mind boggling thing, but also a good thing.

We have a Facebook group found here - https://www.facebook.com/groups/1113359788719597 - incase you want to try hiring a developer for GP. :)

This archived topic is closed to new replies.