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

Create a child theme of Twenty Twenty-Five to replace oik2012 #1

Open
bobbingwide opened this issue Dec 17, 2024 · 11 comments
Open

Create a child theme of Twenty Twenty-Five to replace oik2012 #1

bobbingwide opened this issue Dec 17, 2024 · 11 comments
Assignees
Labels
enhancement New feature or request

Comments

@bobbingwide
Copy link
Owner

The current theme for officialcaravan.co.uk is oik2012.
It's a child theme of Twenty Twelve.
I want to replace the theme with a block based theme, created as a child theme of the latest default bundled WordPress theme Twenty Twenty-Five.

The theme should support the current functionality and improve on the display of custom content:

  • Events (GIGS)
  • Recordings (Discography)
  • Tracks - each Recording consists of one or more Tracks

It should also be enhanced to support the display of such things as:

  • Other recordings
  • Lyrics
  • Composer(s)
  • Artist(s)

Some things that may not be needed initially

  • Shop
  • Membership
  • Comments
@bobbingwide bobbingwide added the enhancement New feature or request label Dec 17, 2024
@bobbingwide bobbingwide self-assigned this Dec 17, 2024
@bobbingwide
Copy link
Owner Author

bobbingwide commented Dec 17, 2024

The theme will be dependent upon logic implemented in the following plugins:

which are dependent upon

We may use the advanced-query-loop plugin to enable context related queries in templates.
This may require hooking into certain filter functions.

@bobbingwide
Copy link
Owner Author

To implement the required changes to the content we'll need to implement a number of migration routines

  • Events - ai1ec_events to events
  • Recordings
  • Tracks

@bobbingwide
Copy link
Owner Author

bobbingwide commented Dec 17, 2024

Oh bugger! When I used create-block-theme to Save changes the saved files appeared to come from Twenty Twenty-Five not my child theme. On reload the versions in the database had been deleted. I didn't notice anything strange with create-block-theme.
The unfortunate thing is that I hadn't taken any screenshots of the changes to the header and footer template parts, which means I'll have to make them all over again.
Next time I'll run save more often, and check the results.

/officialcaravan/wp-json/create-block-theme/v1/save?_locale=user,,
3.243100,8.3.3,1285,3975,444,20,527,22,20,9,524,0.58159112930298,
C:/apache/htdocs/officialcaravan/bwtrace/bwtraces.loh.8,523,11,23013,127.0.0.1,
caravan-2025 0.1.0 twentytwentyfive,
3.242324,
2024-12-17T11:07:04+00:00,
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML; like Gecko) Chrome/131.0.0.0 Safari/537.36,
POST,200

I already knew something was wrong; I'd I checked the unexpected parts into the GitHub repo
with a comment of "Add several files. Not sure why though!" ( commit 40a94e9 ).
Deleting the parts from the repo didn't resolve the problem.

bobbingwide added a commit that referenced this issue Jan 6, 2025

Verified

This commit was signed with the committer’s verified signature.
jsirois John Sirois
bobbingwide added a commit that referenced this issue Jan 6, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
bobbingwide added a commit that referenced this issue Jan 6, 2025
bobbingwide added a commit that referenced this issue Jan 6, 2025
bobbingwide added a commit that referenced this issue Jan 6, 2025
bobbingwide added a commit that referenced this issue Jan 6, 2025
bobbingwide added a commit that referenced this issue Jan 6, 2025
@bobbingwide
Copy link
Owner Author

We may use the advanced-query-loop plugin to enable context related queries in templates.
This may require hooking into certain filter functions.

For the single-oik-recording template we need the advanced-query-loop block to implement the query to list all the tracks for the recording.
This is the first part of the query block that's been modified by AQL.

<!-- wp:query {"queryId":1,"query":{"perPage":20,"pages":0,"offset":0,
"postType":"oik-track","order":"asc","orderBy":"meta_value_num",
"author":"","search":"","exclude":[],"sticky":"","inherit":false,"parents":[],"format":[],"include_posts":[],
"meta_query":{"queries":[
{"id":"e8f5c5bb-80af-48f4-845e-242cb8a093df","meta_key":"_oikt_track","meta_value":"","meta_compare":"\u003e="},
{"id":"72dc05fc-9065-4684-b189-6419bc8cd14b","meta_key":"_oikt_recording","meta_value":".","meta_compare":"IN"}
],"relation":"AND"},
"post_parent":"caravan-2025//single-oik-recording"},
"namespace":"advanced-query-loop"} -->

Comments

  • The value for post_parent has defaulted to the template name
  • ... it's not used in the query; need to check why not.
  • Probably because it's not numeric.
  • Anyway we override the post_parent query parameter with the meta_query which contains 2 sections
    • meta_key _oikt_track is used for the orderby
    • meta_key _oikt_recording limits the tracks to those associated with the recording.
    • the meta_value of . is altered by logic implemented in the oik-tunes plugin in response to aql_query_vars.
    • See oik_tunes_aql_query_vars()

The original version of this query was also mentioned in
ryanwelcher/advanced-query-loop#54 (comment)

@bobbingwide
Copy link
Owner Author

bobbingwide commented Jan 20, 2025

Current screenshot of the footer template part.

Image

In this version I'd made the following improvements

  • moved the search up to the top of the footer
  • moved the Archives and Categories widgets to the top of their columns.
  • the bw_otd shortcode now lists posts, events and recordings

@bobbingwide
Copy link
Owner Author

Current sceenshot of the header template part

Image

  • The navigation menu is full width with a black background
  • There is no link for Shop
    • all the products are out of stock.
    • do we really need WooCommerce?

@bobbingwide
Copy link
Owner Author

Current screenshot for the Archive template.

Image

@bobbingwide
Copy link
Owner Author

Current search template is

Image

@bobbingwide
Copy link
Owner Author

Current screenshot for single template is

Image

  • Title
  • Featured image - which seems a bit big
  • Written by author in category list on post date
  • Content
  • Tag list
  • Separator
  • Prev and next links

@bobbingwide
Copy link
Owner Author

The Site logo in the footer doesn't appear on an iPhone in portrait mode.
I tested this on my desktop in the inspector and got the same result.

Image

@bobbingwide
Copy link
Owner Author

Current screenshot for the Archive template.

The post title and date were arranged in a row.
When the post title was very long the date wrapped onto two rows

It would be better to display the date below the post title.

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