electriccounterpoint
Forum Replies Created
-
Alright, I hacked this together using the advice in this thread. It relies on get_the_content(), though, so it’s still not great.
Maybe the
rtrim
function is the answer? Here’s what I’ve been playing with:<ul> <?php $posts = get_posts("numberposts=6&category=20"); foreach($posts as $post) : setup_postdata($post); ?> <li> <?php $thisaside = the_content(); $trimmed = trim($thisaside, "</p>"); echo "$trimmed <a href=\""; the_permalink(); echo('" rel="bookmark" title="Permanent Link to '); the_title(); echo('">#</a>') ?> </li> <?php endforeach; ?> </ul>
(The second argument for trim() should be “</p>,” but I can’t get it to escape properly in this post.)
This is my special Loop for asides. What I want it to do is to
trim
the closing </p> tag from the end of the_content. It’s not doing that, though; actually it looks indistinguishable from the result of my original code:<ul> <?php $posts = get_posts("numberposts=6&category=20"); foreach($posts as $post) : setup_postdata($post); ?> li> <?php the_content(); echo(' <a href="'); the_permalink(); echo('" rel="bookmark" title="Permanent Link to '); the_title(); echo('">#</a>')?> </li> <?php endforeach; ?> </ul>
By the way, my site is https://danray.org/. You can see the problem on the front page — the “#”s that link to the permalinks in the right column are their own separate paragraphs.
Forum: Themes and Templates
In reply to: How do I change the page title on the templateThat’s not text, that’s part of the image. You’ll have to edit the image itself to change it.
Usually, including text in images like this isn’t ideal, because it won’t be picked up by search engines or screen-readers. So, you might do better to edit the theme to place some actual, HTML text there yourself.
bump
Forum: Fixing WordPress
In reply to: Google Analytics shows everything going to ../index.php — normal?No, mine’s in the footer too. I guess I didn’t mean the loop, but rather the theme’s index.php, which calls the footer (“<get_footer()”). I’m using a version of the Hemingway theme; I wonder if it uses a nonstandard way to call the footer that results in Google Analytics thinking every page is “index.php?”
Forum: Fixing WordPress
In reply to: Page loading time according to PingdomIt’s not that bad, but your page did take maybe 10sec until everything was loaded. That’s including all the graphics — the majority of the page was displayed and readable within a few seconds.
WP-Cache does reduce loading speed, but whether it’s significant depends on where your bottleneck is. WP-Cache basically removes the database lookup time from the equation, but (at least from on your front page) what’s holding you up is all your images. The plugin can’t (somebody correct me if I’m wrong) cache those images that you’re linking to hosted on other servers, and I think that connecting to those other servers might be what’s slowing you down.
If you use Firefox, take a look at your front page and right click on it, then choose “Page info.” Go to the “media” tab and you’ll see what I mean.
Hope this helps,
DanForum: Fixing WordPress
In reply to: Adding some HTML inline after each excerpt?Bump?
Forum: Fixing WordPress
In reply to: All pages but index.php are gone!Erm, actually, just figured it out:
I used CPanel a few days ago to turn off my rule forbidding hotlinking, and it sort of got confused and [apparently] deleted the .htaccess entry that permits WP’s “friendly permalinks.” Once I re-entered the modrewrite code (copied from wp-admin->options->permalinks), everything’s back to normal.
Forum: Developing with WordPress
In reply to: Articles in 2 columnsThe CSS3 standard will incorporate dynamic, newspaper-like columns, such that text from the bottom of the first column will wrap automatically to the top of the next. Your link is broken, so I can’t see the example you’re referring to, but I assume that’s the kind of column you’re talking about.
The reason that this is going to take a whole new version of the CSS standard is because it’s horrifically difficult to do in today’s browsers. If you have a head for code, take a look at the source for the Int’l Herald Tribune’s [beautiful] columnar layout to see the hoops they had to jump through.
So I don’t know how to help you beyond that, but if it’s something you want to pursue, good luck!
Forum: Fixing WordPress
In reply to: 404 Error in IE6 but not Firefox???404 in FF 2.0 here. Have you cleared your cache in Firefox?
Forum: Fixing WordPress
In reply to: 1 post, 3 asides on front page (Hemingway)I’m not saying that the codex is faulty (in fact, if I get this working, I’ll gladly update it with instructions for the Hemingway family of themes). I’m just trying to figure out what does what in my theme and in this code.
I guess for now I’ll go back and look at the codex’s page on the Loop.
Forum: Fixing WordPress
In reply to: 1 post, 3 asides on front page (Hemingway)Right, that’s the page I linked above. My problem is, my index.php (also linked in the first post) doesn’t look like the default one that they’re using as an example, so I’m struggling to place the code where it belongs.
I wish the codex’s code snippets were commented in such a way that I could figure out what each line was meant to do. I’m starting to learn PHP, but as it is now, I’m stuck.
Forum: Fixing WordPress
In reply to: 1 post, 3 asides on front page (Hemingway)bump — can anyone give me an idea of where to start?
Forum: Fixing WordPress
In reply to: API Key insertion for Stats Plugin generates errorThis might be a problem with your host. As I understand it, the stats plugin requires the fsockopen function, which your server might not allow. I have a shared hosting account and my registration failed at the same point (API key entry) for that reason.