How to set up “latest comic” page?
-
Hello Mr. Frumph! π
Could you please let me know how to set up an html page that automatically displays the most recent comic post? So the link to it would look like: mycomic.com/latest/
I feel like it should be pretty simple, but I just can’t wrap my head around it. My homepage is customized for other information, and so I just need a separate “latest comic” page.
Thank you SO MUCH for your help!
Sincerely,
Chama
-
P.S.: I do know of the way to link to the latest post — comic/?latest. And that works great.
I’m just looking for a way to integrate that function into a static html page.Mr Frumph, here’s what I’ve tried so far:
I duplicated the “index.php” file, and renamed it as “latestcomic.php”
Gave in the template name “Latest Comic”Then I made a new blank page titled “latest,” and set the page template to “Latest Comic.”
So now, in theory, when I got to http://www.chamastories.com/thesunprince/latest/
I should see what the index file would’ve called up, right? I should see the latest comic displayed with all the sidebars. Basically what the default home page would’ve looked like.It’s not working, tho. Please please let me know how to fix it! (Probably super simple, I’m just not seeing it. XD)
Thank you
Is there a shortcode to just show the latest on any widget?
/?latest at the end of your url would bring it to the latest comic if you’re creating link
@kytmagic the thumbnail widget has an option to show the latest thumbnail of the latest comic in it yes
Mr Frumph, I can’t use /?latest. It has to be a dedicated page that a webcrawler can scan weekly for updates.
Normally this would be the home page, but since I made it static, I need to set up a separate “latest” page that updates automatically.
Please help. I’ve tried everything and I just don’t get it.
If you’re using comicpress with comic easel you can setup a ‘landing page’ with /chapter/chapter-slug/ as part of the url which will have the ability to be linked to as well as the latest comic, the defines for it are in the comic -> config area
If you’re not using comicpress you can create a taxonomy-chapters.php file that will be used as the landing page, that links with /chapters/chapter-slug/ but you’ll need to add your own loop inside of it to get the latest from the chapter slug that is given (variable is passed to the taxonomy page so is easy to get)
Hi Mr. Frumph,
I set up a landing page for the current chapter – which does serve my needs for now. Thank you so much!The downside is that I’ll need a new URL for each chapter. I’d still love to have a permanent “latest” page.
I’m trying to set up a page template, but I can’t figure out how to implement Comic Easel code into it.
Could you please take a look at this?<?php /* Template Name: LatestComic */ get_header(); do_action('comic-area'); do_action('comic-blog-area'); if (!comicpress_themeinfo('disable_blog_on_homepage')) { if (have_posts()) { while (have_posts()) : the_post(); get_template_part('content', get_post_format()); endwhile; if (comicpress_themeinfo('enable_comments_on_homepage') && (comicpress_themeinfo('home_post_count') == '1')) { $withcomments = true; comments_template('', true); } else comicpress_pagination(); } } get_footer();What am I doing wrong here?
Thanks again for all your help.
P.S.: I am using ComicPress with Comic Easel!
Oh that’d never work, you need to setup the query for what posts you want to grab first.
If you look at this bit of code here:
https://github.com/Frumph/comic-easel/blob/master/functions/injections.php#L46You will see the $comic_args which tell the wordpress system what posts to find
then this part:
$comicFrontpage = new WP_Query(); $comicFrontpage->query($comic_args); while ($comicFrontpage->have_posts()) : $comicFrontpage->the_post(); ceo_display_comic_wrapper(); endwhile;is the actual loop to display the comics from the arguments you passed to it with the $comicFrontpage->query($comic_args);
this actual bit of code is how it displays as its injected into the home page, but use it as a reference to how you would setup that page your creating
I read the words.
I see the code.
I don’t understand anything. XD I’m so sorry, my knowledge is just not enough.Is there a way to perhaps just duplicate the code for a landing page? Make it into a page template?
Right now it’s so perfect — shows the latest comic and the blog area. That’s it, that’s all it has to do. Is there a way to just duplicate and “point” it to the overall comic URL, not just a current chapter URL?
ya know, this is all roundabout anyways
use the [showcomic] shortcode on a page should be just fine for what you want to do
say you want to add a comic into any post you have to ya know, whatever – reference it; doesn’t matter .. this will embed the image with a link to the comic into whatever post you put it in
it has parameters:
character,size(thumbnail/large/full),slug,chapter,orderby(rand/asc/desc),month,day, year
so doing:
[showcomic orderby=rand character=charlie]will make a random comic appear in the post that has the character with the slug charlie set to it
[showcomic orderby=asc chapter=chapter-1]
show the first comic of the chapter with the slug chapter-1 orderby=desc would be last comic and orderby=rand would be a random comic in that chapter
… you can be specific and make it
[showcomic slug=chp1pg3 size=full]would make the comic post with the slug chp1pg3 (use your own) appear, .. specifically that comic only
The topic ‘How to set up “latest comic” page?’ is closed to new replies.