Forum Replies Created

Viewing 15 replies - 1 through 15 (of 116 total)
  • I got a 404 on that link you have.

    What about file encodings? I know that PHP doesn’t seem to like UTF-8 files with a BOM, and that may cause WordPress to dis-regard it. (Just taking wild guesses here.)

    In your admin panel options page, you can set it to show a set number of latest posts, or a set number of days’ posts (pull-down menu). I’m now sure how it will work, but why not try it out?

    1) For individual post pages, you need to add the image to your single.php file. Look for the line that says Filed under..., and above that line, add in your image like this:

    <img height="50" src="https://www.nunkeypublishing.com/images/sig.gif" width="141" align="left" />

    2) But the above will not show where you have multiple post listings, such as your home page, category archive listing, etc. To show it for each post where you have multiple posts, you need to add the same line above, to the same position, in your index.php, and your home.php, category.php (if these exists).

    First thing you can do is backup your current page.php, then copy index.php to page.php, and start over.

    To remove the date, look for the line that begins with <p class="post-info"> and delete it up to the first
    on the same line.

    page.php shouldn’t be showing excerpts, I can’t imagine why anyone would have done that. But if it is indeed showing excerpts, then look for where it calls the_excerpt(....) function, and change the function name from the_excerpt to the_content. That should do it.

    Once you’re satisfied with your new page.php, you can delete your backed-up one.

    Forum: Fixing WordPress
    In reply to: Drafts

    You mean you click on the draft post’s link, it goes to the editor for about half a second, then automatically loads the post preview?

    In other words, you can’t get it to publish?

    Here’s my suggestion:

    <div id="content" class="narrowcolumn">
    <div class="post">
    <h2></h2>
    <img src="advertmock.jpg">
    <p class="postmetadata alt2"></p>
    </div>
    <?php if (have_posts()) : ?>

    Basically this just replicates your post structure to get the same spacing and lining. It ended up I didn’t really need to see the index.php—contrary to what I suspected, there’s nothing weird going on in the source code. Would have got this resolved two days ago if I had read your reply carefully. My apologies.

    I’m a little unsure about including the logo in a theme—as long as you don’t do it in a way that makes false-leading representations, I guess there wouldn’t be problems.

    If you want to cover your bases, why not post a link to your theme once you finish it, so people can have a look?

    View source is not going to help as I need to see the PHP code, not the resulting HTML. What you could do is zip it up and upload it using the WordPress built-in file upload feature, then give a link to it here.

    You can’t view the .php file directly because your server is executing the code.

    If you still can’t get it to work, just send me the index.php file via email to alexwang.moonfire AT gmail DOT com.

    Please use the edit link under your post to put in the code that disappeared. Remember to put code between “backticks” (the key left of “1” on the keyboard), as stated under the “Send Post” button when you wrote your post.

    If you could upload your theme’s index.php somewhere, and also the banner image, maybe we can be more specific, perhaps getting to a solution rightaway. It’s inefficient to keep on guessing and trying.

    I would suggest first that you put an ID on that image, e.g. <img id="admock" src="..." .../>, and then in your theme’s style.css, style it appropriately.

    1) Positioning

    You need to place this image tag after your <div id="content" class="..."> tag. This means that it will have the same width boundaries as your posts and not eat into your sidebar space.

    2) Spacing

    If you want to adjust the image’s spacing, dump this into your theme’s style.css:

    #admock {
    margin: UP RIGHT DOWN LEFT;
    }

    where “admock” is the ID you gave your img tag, and UP, RIGHT, DOWN, LEFT are four numerical margin values for the image, in that order.

    But before you do this, first try enclosing the img tag with a <div class="post">:

    <div class="post"><img ...your image...></div>

    This should work. If not, then try the ID thing.

    Forum: Plugins
    In reply to: the_content

    1) You can always just check the current URL to see what kind of page you’re on. Or you could dig up the WP code itself and see how is_page() and so on makes the decision.

    2) How about hooking onto the_posts and dump your TOC into a private variable first, then hook onto the_content and insert your TOC?

    Now talking of this problem as a plugin in general, you must realize that not a lot of themes do what you’re doing—show the latest post in full, and show only excerpts for the remainder. This is an exception rather than the rule, I think.

    The normal behaviour would be that each post shows only what’s before the more tag (or automatically generated excerpt), and the full post is only shown on Single pages. You need to think over carefully where TOC’s are supposed to appear, and how you’re going to handle these “normal” situations for other users, if you’re planning to release this plugin for general use.

    Personally, I do write paginated posts and I’ve thought about a TOC before. But I would not want a TOC on archive list pages, I’d only want it to show in single-post pages.

    …my God. I’ve known “posts” was a pull-down list since I don’t know when, but it never registered in my head that it can be changed to anything else.

    But then again, “posts” should be the default setting, if I recall correctly?

    Forum: Plugins
    In reply to: the_content

    Have a look in the Codex for is_single() and is_home() etc., listed (I think) under the “Conditional Tags” Codex article.

    On the original topic, I’ve always thought the_content contains the current post’s to-be-displayed content, whether it be the excerpt before the more tag, or be it the full post, or paginated post pages. In other words, when you go to the next page, your filter that hooks onto the_content will act on the second page content. This is more efficient and (I think) the right way to do it if you’re looking to filter post content.

    PS: TBD = To Be Done, also often used for “To Be Determined”.

    It could be that you are using a theme that is designed to display only one post on the home page. What theme are you using? Try switching to the default theme and see if it works.

Viewing 15 replies - 1 through 15 (of 116 total)