alrescha
Forum Replies Created
-
Forum: Plugins
In reply to: Plug In file not showing on activation pageI 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.)
Forum: Fixing WordPress
In reply to: Show today’s post onlyIn 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?
Forum: Fixing WordPress
In reply to: How To Add Image To Post Footer1) For individual post pages, you need to add the image to your
single.php
file. Look for the line that saysFiled 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 yourhome.php
,category.php
(if these exists).Forum: Themes and Templates
In reply to: yikes – lost my columns????First thing you can do is backup your current
page.php
, then copyindex.php
topage.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 callsthe_excerpt(....)
function, and change the function name fromthe_excerpt
tothe_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: DraftsYou 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?
Forum: Fixing WordPress
In reply to: Adding a banner onto my main WP pageHere’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.
Forum: Everything else WordPress
In reply to: WordPress logoI’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?
Forum: Fixing WordPress
In reply to: Adding a banner onto my main WP pageView 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
.Forum: Fixing WordPress
In reply to: Before and After Links BrokenPlease 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.
Forum: Fixing WordPress
In reply to: Adding a banner onto my main WP pageIf 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.Forum: Fixing WordPress
In reply to: Adding a banner onto my main WP pageI 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 yourimg
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_content1) 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 ontothe_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.
Forum: Fixing WordPress
In reply to: 3 most recent posts always on front page-how?…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_contentHave a look in the Codex for
is_single()
andis_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 themore
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 ontothe_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”.
Forum: Fixing WordPress
In reply to: 3 most recent posts always on front page-how?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.