Donate
While I don't maintain stripShow for a living, I wouldn't say no to a little donation, if you think the plugin is worth it...
Advertisements
-
RSS Links
-
Meta
Recent Forum Posts
-
Stripshow 3.0 killed all my comics!
posted in forum Support Requests by Li-An on January 18, 2012 at 3:45 am
-
Call User error message.
posted in forum Support Requests by lesbionix on November 27, 2011 at 7:38 pm
-
This post is a comic - not working
posted in forum Support Requests by Brad on November 27, 2011 at 1:17 pm
-
Getting The Side Bar Besides The Comic In Either Sandbox Or AutoComic
posted in forum Support Requests by Brad on November 16, 2011 at 6:26 am
-
"Your comics directory is not writable by the web server"
posted in forum Support Requests by Brad on August 18, 2011 at 5:59 am
-
Stripshow 3.0 killed all my comics!
Forums | Add the comic date near the comic title
Add the comic date near the comic title
4:19 am
February 21, 2011
siv0968
Italia
posts 7
Post edited 4:20 am – February 21, 2011 by siv0968
Hi,
as I written on topic title, I'd like to add the comic date near the comic title in the file "comic-actions.php". This is the title code in that file:
I've tried to copy the code of the date in the "comic-rant.php" file:
but it ruins the structure of the title and the navigation buttons, and also make disappear the date under the rant title.
Do you have any suggestions on how to resolve this problem?
Bye!
6:59 am
February 21, 2011
GreenGel
posts 21
I'm not entirely sure, but in order to to do this, you may be better off changing your theme files, I think, rather than changing a different file to try and add it. Changing the theme file you could just use the date function WordPress already uses. There's some information on that in the WordPress Codex, which gives a few options on how to do it and which function to use:
http://codex.wordpress.org/Fun…..e/the_date
http://codex.wordpress.org/Tem…..t_the_date
http://codex.wordpress.org/Tem…..s/the_time
7:17 am
February 21, 2011
Brad
posts 233
I suggest putting your code below the navigation buttons, not the date. Like this:
<ul class="stripshow-comic-navbar">
<li class="first-comic"><?php first_comic('<span class="linktext">First Comic</span>','First Comic'); ?></li>
<li class="previous-comic"><?php previous_comic('<span class="linktext">Previous Comic</span>','Previous Comic'); ?></li>
<li class="next-comic"><?php next_comic('<span class="linktext">Next Comic</span>','Next Comic'); ?></li>
<li class="last-comic"><?php last_comic('<span class="linktext">Last Comic</span>','Last Comic'); ?></li>
</ul>
</div>
<div class="entry-date"><abbr class="published" title="<?php the_time('Y-m-dTH:i:sO') ?>"><?php unset($previousday); printf( __( '%1$s – %2$s', 'stripshow' ), the_date( '', '', '', false ), get_the_time() ) ?></abbr></div>
You'll probably want to give it your own CSS to make it look good. I like this:
margin: -10px 0 0 10px;
}
7:47 am
February 21, 2011
siv0968
Italia
posts 7
Thank you Brad!!!
It works perfectly, both php and css code!
Now the problem is: with the date shown under the comic-title, the date in the comic-rant has disappeared (only the day/month/year, not the time)… like wrong re-called variable.
Bye!
8:38 am
February 21, 2011
GreenGel
posts 21
I believe that is because of the use of "the_date" function which only shows up once per page. Try changing this code:
To this code:
.
Basically we just change the call to the_date() to be the_time() instead.
11:41 am
February 21, 2011
siv0968
Italia
posts 7
Thanks GreenGel!
With your help I found a solution with this code:
I put the correct date format to the_time function, in order to have the same date format as the one near the title, and the problem is no more!
Thank you all again for these sooooo quick answers!!!