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

Link to Last Webcomic in Collection (Gutenberg) #345

Closed
reccanti opened this issue May 3, 2020 · 4 comments
Closed

Link to Last Webcomic in Collection (Gutenberg) #345

reccanti opened this issue May 3, 2020 · 4 comments

Comments

@reccanti
Copy link

reccanti commented May 3, 2020

Thanks for the great plugin! Apologies if this is answered somewhere in the docs, I've been having trouble finding a solution that works. I'm looking for examples of what I need to do (if there's a way to do this in the Gutenberg editor) or a place to start (if there isn't).

Expected Behavior

I'm looking to create a hardcoded link to the latest webcomic in a collection. The theme I'm uses the Gutenberg editor. I'd expect to be able to insert a shortcode or a widget from the Gutenberg block menu, or to be able to have a link like /mycomic/latest that would link to the latest comic in a collection, but so far I've been unable to come up with a method that works.

Current Behavior

Currently, I'm unable to find any way to get a link to the latest comic in the collection. Most of the documentation in the Wiki either doesn't seem to work the way I'd expect ([last_webcomic_link](https://github.com/mgsisk/webcomic/wiki/last_webcomic_link__ shortcode)) or I can't figure out how to apply it in the Gutenberg editor (last_webcomic_link widget)

Context

I have a landing page that links to several different projects. In one of them (Sketches) I'd like to have a link to the last sketch I uploaded.

Screenshot of my home page

Example

Environment

  • Webcomic: 5.0.6
  • WordPress: 5.4.1
  • PHP: 7.2
@reccanti
Copy link
Author

reccanti commented May 3, 2020

Update: I seem to have been able to get it working using the following shortcode block:

[last_webcomic_link post="86" args="relation='last'"]See Latest[/last_webcomic_link]

Where post="86" refers to the first post in the collection. Seems good for now, but a little hacky. Is there a more intuitive way of doing this? Also, would it be possible to update some of the wiki entries with examples?

@visceralrose
Copy link

Sorry to hijack this but I'm having this same problem and can't find a solution anywhere...

Ever since changing my webcomic's home page to a static page, my 'latest' links completely stopped working... They all direct to the home page, so I guess I did something wrong?

A short code won't work for my menu ( I don't think ) so a url to use would be ideal...! I can't figure it out at all...

@tehandeh
Copy link

Maybe this might help as a work around? Shortcode in menus

@visceralrose
Copy link

Maybe this might help as a work around? Shortcode in menus

Giving it a try now! Thanks!

@mgsisk mgsisk closed this as completed Jan 18, 2022
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

4 participants