Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop an archive template - or just use index.html #24

Closed
bobbingwide opened this issue May 4, 2022 · 3 comments
Closed

Develop an archive template - or just use index.html #24

bobbingwide opened this issue May 4, 2022 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@bobbingwide
Copy link
Owner

bobbingwide commented May 4, 2022

In the genesis-sb theme there are a number of specialised templates for displaying archives.
These use a common function called genesis_sb_page()
Is this logic necessary in FSE, or can we just get away with index.html?

Genesis-SB Special logic? SB template
archive.php archive.css index.html
category.php achive.css index.html
date.php date.css - empty index.html
search.php YES search.html

Quick analysis indicates that we can get away with using index.html for the archive, category and date archives but need special logic for the search results.

Search results

The Search template displays different results depending on the actual search performed and the results obtained.
This is implemented by logic in a couple of filter functions genesis_sb_do_search_title and genesis_sb_search_banter()
The first displays the heading, the second the report on the search terms used


No results found

Search Results for: serve busts
Searching Beautifully...
Considering terms: serve busts
This doesn't qualify for automatic creation of an SB.

Results found

Search Results for: supplied by
Searching Beautifully...
Checking first post: Steve Biddle

Then the results are displayed as for index.html

Only an S word

Search Results for: supplied
How about a B word too?

Only a B word

Search Results for: by
How about searching for an S word as well?

Bad search

Search Results for: frogs legs
Try to search for an S-word a B-word or both
Sorry but, no posts surfaced before I gave up looking. Sobeit.

Possible solution

It could be possible to add a search-banter.html template part to index.html; inside body-and-sidebar.html

@bobbingwide bobbingwide self-assigned this May 4, 2022
@bobbingwide bobbingwide added the enhancement New feature or request label May 4, 2022
@bobbingwide
Copy link
Owner Author

bobbingwide commented May 4, 2022

In Carolina Nymark's full site editing site she explains how to use PHP templates in block themes.
This is an alternative solution to implementing the search-banter.html template part, which itself would implement a dynamic server side rendered block.
I'm going to try the block solution first; I'll implement the bigram/search-banter block in the bigram plugin.

@bobbingwide
Copy link
Owner Author

bobbingwide commented May 9, 2022

There are a couple of problems with the current solution

  1. The number of posts displayed on archive pages is too low. 8 rather than 60.
  2. There's no Archive title or Breadcrumbs.
  1. The number of posts displayed on archive pages is too low. 8 rather than 60.

This can be resolved by using oik-types. For the bigram post type set the Archive posts per page setting to 60.
This is the same value as for Blog pages show at most on Settings > Reading Settings

  1. There's no Archive title or Breadcrumbs.

This can be resolved by using the Query Title and/or Breadcrumbs block

<!-- wp:query-title {"type":"any", "level":3, "align":"center" } /-->
<!-- wp:sb/breadcrumbs-block /-->

@bobbingwide
Copy link
Owner Author

This can be resolved by using the Query Title and/or Breadcrumbs block

See 94b7ad8

Delivered in SB v0.2.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant