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

Add photo gallery page layout to our custom WP theme #160

Open
hs4man21 opened this issue Oct 31, 2020 · 0 comments
Open

Add photo gallery page layout to our custom WP theme #160

hs4man21 opened this issue Oct 31, 2020 · 0 comments
Assignees

Comments

@hs4man21
Copy link
Contributor

hs4man21 commented Oct 31, 2020

We want to check each post for some photo gallery category or categories (for now you can just use an existing category like "Opinions" or "News" for testing purposes) and render ContentView (See ContentView.tsx) differently if a post belongs to a photo gallery category. We can check for the category in the post object's tsdCategories property (an array) and retrieve the post HTML in the post object's postContent property (a string).

We will pull from the content in that string and use it to fill a template for the new photo gallery layout.

Here's an example of how this might look in ContentView.tsx:

Screen Shot 2021-04-16 at 9 15 30 PM

Notice how we have a different layout for Humor articles, and others have the second layout (most of which is cut off here).

Here's the guiding example we discussed: https://www.washingtonpost.com/graphics/world/2020/08/04/photos-show-aftermath-beirut-blasts/

The rest is pretty open-ended! We'll def want to consult with the photo/video staff after some initial development and experimentation.

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

No branches or pull requests

3 participants