rhandir
Forum Replies Created
-
Forum: Themes and Templates
In reply to: New Theme: picoTokyo. Designed for webcomics. (ver .902)I’m not sure what happened.
What I do see is this:
in the original:
<?php if ( in_category(’14’) ) { ?>
in your version:
<?php if ( in_category(’05’) ): { ?>Notice that it picked up a colon between the last right parentheses and the bracket. Does taking that out fix it?
Forum: Themes and Templates
In reply to: New Theme: picoTokyo. Designed for webcomics. (ver .902)Hey folks.
There’s some additonal bugs in this theme:
There are hard links back to my site in the theme. The banner image at the top, and at least two of the links (FAQ and archive) still point back to my site. I’m pulling this theme from my download directory until I get a chance to fix that. Sorry.Forum: Themes and Templates
In reply to: New Theme: picoTokyo. Designed for webcomics. (ver .902)I’m kinda swamped right now, so this answer is kinda crappy. (I haven’t looked a xcomic yet. I did look at the walrus source code. Looks pretty neat, but the example setup they had at their site didn’t fully load, which I take as a bad sign.)
You should be able to do what you want to do with the regular one loop, and a handful of “if” statements actually. (Two loops might be more efficient.)
Basically, the way picoTokyo works, is that WordPress sees that it’s supposed to pull a post from the database, and checks to see if it belongs to the “webcomic” category. If it does, it styles it differently, and adds some buttons.
For what you want to do, you could just stick in the “if” statement I have below, set your blog to only show two posts at a time, and remember to put your comic in the second post (so it shows up at the top).
Let me show you what I mean:
In your index.php you’ll have these two lines:
1.<?php if (have_posts()) : ?>
2.<?php while (have_posts()) : the_post(); ?>
Translation:
1. WordPress, if you have a post today, do this:
2. While you have the post, show the post on the page.After that bit, I add:
1.<?php if ( in_category('14') ) { ?>
2.<!-- use this html -->
3.<?php } else { ?>
4.<!-- use this html instead -->
5.<?php } ?>
Translation:
1. Is the post in category #14?
2. then do this!
3. Otherwise,
4. do this other thing.If you want to stick buttons in Kubrick, then try this:
1. look for the line in index.php that begins with:
<p class="postmetadata">
2. Hit return, and paste this in. Change ’14’ to the category ID # your webcomics are in. Look at the categories menu under “Manage” and see what number is in the ID column next to your webcomic category.
<?php if ( in_category('14') ) { ?>
3. Then copy in the buttons you want to show there:
<!-- Buttons go here! -->
4. Add a linebreak so it doesn’t get mashed in with the rest of the post stuff.
<br>
5. Then paste in the rest of the if statement:
<?php } else { ?>
<!-- you don't need anything on this line -->
<?php } ?>
6. Make sure the next thing that shows up is
Posted in<?php the_category(', ') ?>
It should look like this:
<p class="postmetadata">
<?php if ( in_category('14') ) { ?>
<!-- Buttons go here! -->
<br>
<?php } else { ?>
<!-- you don't need anything on this line -->
<?php } ?>
<?php the_category(', ') ?>
WAIT! The buttons!
Here’s the code I use for the buttons, simplified a little. You can cut and paste that into the spot marked “buttons go here”.<!-- this lets me put a box and a background around this button -->
<span class="button">
<!-- Copy the link from your first page and stick it here. -->
<!-- This is the "first" button -->
<a href="https://www.example.com/blog/index.php?paged=2">' ‹ ‹ first '</a>
<!-- this stops the box for this button from bleeding over to the next button -->
</span>
<!-- This is the "previous" button. -->
<?php posts_nav_link(' ',' ',' <span class="button"> ‹ previous </span>'); ?>
<!-- This is the "next" button. -->
<?php posts_nav_link(' ','<span class="button"> next ›</span> ',' '); ?>
<!-- This is the "today" button. -->
<span class="button">''<a href="/blog"> today › › </a></span></span>
<br>
===
You’ll need to add these lines to your styles.css, too:
.button
{
color: black; /* this is the text color */
background-color: yellow; /* this is the color of the button */
border-style: solid;
border-width: 1px;
border-color: black;
}Whew! That was a lot of crap. Sorry to bury you. I don’t even know if I answered your question!
-R.
EDIT: fixed backticksForum: Themes and Templates
In reply to: New Theme: picoTokyo. Designed for webcomics. (ver .902)Hi-larious! Excellent comic. I’ll take a closer look at this tonight, and see what I can do. Integrating picoTokyo and kubrick might not be that hard. I’m not familiar with xcomic, I’ll have to look that up.
-R.
Forum: Themes and Templates
In reply to: New Theme: picoTokyo. Designed for webcomics. (ver .902)picoTokyo .903a_public is ready for release.
Can be seen at: blog.rhandir.com
Download at: https://www.rhandir.com/download/New features:
- Added comment, archive, and sitemap page templates.
- More fine-grained control over link colors.
- Header and footer are now split from index.php
- More comments!
Fixes:
- TextArea in comments is a reasonable size.
- Colors aren’t as aweful. (Please change them to your own color scheme though. We can’t all look alike, can we?)
- “First” navigation button now goes to the oldest page of the blog. (This also introduces a bug: It always points to my site and it is hard-coded into index.php, and other custom page templates, so you’ll need to change this as appropriate.)
Bugs:
- Some important comments are only found in header.php
- The navigation button “first” points to my site. You’ll need to change this to fit your own site’s url.
- Comments don’t reflect some changes. (Like adding a comments template.)
Errata:
H1, h2, h3, are actually used.
Forum: Themes and Templates
In reply to: New Theme: picoTokyo. Designed for webcomics. (ver .902)Sure, no problem. That’s slated to be fixed in ver .903 anyway.
-RhandirForum: Fixing WordPress
In reply to: WordPress-powered webcomic?I announced a theme designed for webcomics here: https://www.ads-software.com/support/topic/48034
Forum: Fixing WordPress
In reply to: overriding text displayed by posts_nav_linkMy god, I am an idiot.
Sorry.
For the curious, I forgot that I had cut and pasted the following in, when I was first experiementing:<?php next_posts_link('« Previous Entries') ?>
`<?php previous_posts_link(‘Next Entries »’) ?>’