LearnWebCode
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Custom Excerpts – Removing "Continue Reading" LinkI suppose this was a bit simpler than I imagined. I simply went into the theme’s functions.php file and removed any functions that dealt with “excerpt.” It worked like a charm.
Forum: Themes and Templates
In reply to: Syntax Error in Conditional Custom Field CodeI discovered the problem.
In case any other PHP beginners have the same question/problem, here’s the fix.
The
<?php endif; ?>
after the “without custom page header” section should be removed, and in its place, add:<?php } ?>
Hi Ipstenu,
This was my original structure:
https://my-site.com/year/month/day/this-is-the-title/
And I changed it to this:
https://my-site.com/this-is-the-title/
However, I also did something that I realize now was foolish.
Many of my posts were titled “XHTML Lesson 1: title subject” or some other lesson # and subject. I didn’t want “xhtml-lesson-#” in every URL (because I read that shorter, to the point URLs are more effective) so I edited the permalinks to just contain the subject/title of the post.
I don’t have that many posts yet, so perhaps I could set up a manual / hardcoded htaccess redirect for the 10 or so posts that are effected by this? I’ll search around for a htaccess guide.
Thanks!
Forum: Themes and Templates
In reply to: Modifying the loop to output different code for the first post?I just figured this out.
In the case that anyone else is looking for the same solution, I’ll explain how.
I looked for themes that styled the first post differently. I found one and downloaded it, then looked at the “index.php” file to see how it was done. This is the method I’m currently using. I’m sure there is a better way, but I’m not much of a PHP guru, so…
<?php query_posts('showposts=1'); ?> <?php if(have_posts()) : ?><?php while(have_posts()): the_post(); ?> your code for first post <?php endwhile; ?> <?php endif; ?> <?php query_posts('offset=1'); ?> <?php while (have_posts()) : the_post(); ?> code for all the other posts <?php endwhile; ?>
Cheers,
LWCForum: Plugins
In reply to: Problem After Updating “SyntaxHighlighter Evolved”I figured out the problem.
Comment #186 asks my same question:
https://www.viper007bond.com/wordpress-plugins/syntaxhighlighter/The solution is to remove any mention of “code” or “pre” elements in your CSS files. It causes problems with the updated version of the plug-in.