Support » Fixing WordPress » Posting question for noob

  • I have a quick question about posting that I cant figure out.

    Ok, so I am setting up a word press for a friend and what I want to do is have a short post with a picture to the left of it similar to this link that links to it’s own page where the full post is.
    Is this a function when you post? Do I have to make 2 posts? A short one for the front page that has a link to another page?
    What is the procedure for this?

Viewing 9 replies - 1 through 9 (of 9 total)
  • No, you don’t have to make two posts. This is a WordPress built-in feature called “Excerpts“. Here’s what to do:

    1. First, make sure your theme’s index.php template file (or wherver you want these “excepts” to appear) calls “the_except”, and not “the_content”
    2. With this in place, WordPress will automatigically take the first few lines of your post as the “excerpt”. If you want to specify your own except, look below the “Add New Post” field for “Except”

    For more information about this feature, take a look at this: http://codex.wordpress.org/Template_Tags/the_excerpt

    Hmm…. I don’t think you can entirely solve your problem with Excerpts. At least, not exactly like the site you pointed out. For that, what you are looking for is a magazine-style theme. Google it if you want to know more.

    But the solution suggested by gappiah can achieve a very close result, with much less work.

    Another approach would be using the tag <!–more–> when writing your posts. This way, the index will show only until this point. Insert a left image before the tag and you’re good to go!

    Thread Starter vdubplate

    (@vdubplate)

    I’ve checked out and googled The Excerpt function and that is close to what I want to do but can I add images to the Excerpt like the ones found on: http://www.photoshoplady.com/

    Is there a plugin that can help me out here? Or does anyone know how I would go about moding this myself? I don’t know any php but I know HTML and CSS pretty well. Any links with tuts on this? It seems to be a pretty common thing but I can’t find good documentation.

    Thread Starter vdubplate

    (@vdubplate)

    Actually, let me clarify. What renato_s suggested above using the <!–more–> works but I need to add an image to the left and the post excerpt to the right the same way that http://www.photoshoplady.com/ does it.
    So what I need is to have an image that is a certain size for every thumb nail that will appear in the excerpt post. The problem is that I need to figure a way to add a pre sized image to all my excerpt posts to keep a uniform size. Does anyone know where I can modify my posts? Any help would really be appreciated.

    Sorry for the delay: I’ve been away from civilization 🙂 On adding images to the excepert, there are several ways to do this.

    1) If you use “the_except” function, you can manually add an appropriately sized image (img tag) to the Except field, and this will be displayed along with your text. [Note that this will not work with the “More” button because WordPress automatically strips out all HTML].

    2) If this is too much work for you, you can use a plugin to automate this. Basically such a plugin typically scans your post for the first image, resizes it, and adds the image to your excerpt.

    See => Thumbnail For Excerpt plugin: http://wordpress.org/extend/plugins/thumbnail-for-excerpts/

    3) Another class of plugins will help you do the same via WordPress’ Custom Field feature. See “Get The Image WordPress Plugin” => http://justintadlock.com/archives/2008/05/27/get-the-image-wordpress-plugin.

    Hope that helps. Sorry once again for the delay.

    Thread Starter vdubplate

    (@vdubplate)

    rcpkrc

    (@rcpkrc)

    l am having the same problem, but l still couldnt solve…

    tolo87

    (@tolo87)

    I am also having that same problem. Sorry that I am a noob. Dont know what to do. Tom

    One way is to just use WordPress custom fields together with either the <!– more –> function or the_excerpt. You do NOT need to have plugins for every tiny thing you do – it’s bad to add plugins to do things WordPress already can do since you may have problems with the plugin author abandoning the project, future updates being incompatible with the plugin etc…

    Do this:
    1. Set a WordPress thumbnail-size that you wish to use in your WP-admin, make it cut the image to for example 100×100 (default).

    2. Edit your index.php, single.php etc. – the place you want to have the thumbnails listed on… and in the loop add:

    <?php $key="postthumb"; if(get_post_meta($post->ID, $key, true)){ echo <img src='get_post_meta($post->ID, $key, true);' /> } else {} ?>

    3. Goto Write post -panel.
    4. Upload a image.
    5. Write something..
    6. Check the url for the thumbnail of the image you uploaded (default: http://www.YOUR-URL.com/wp-content/uploads/2009/10/YOUR-IMAGE-100×100.jpg … or similar).
    7. In the custom fields box write “postthumb” and add the url to your thumbnail image.
    8. Save and check.

    Not a 100% if it works since i haven’t tested it myself, but customfields is the way to go anyway. You can read more about it by just searching for custom fields etc. on the forums here. The basic promise is anyway to DEFINE a custom field in your template(s) and then in the post panel add value (like an url in this example) to it. You can also define a value that is displayed when you have not entered any data for the custom field.

    Btw.. this is how i add custom TITLE-attributes to my pages and posts in wordpress via custom fields (a working example.. 😉 ) :

    header.php:
    <title><?php $key="title"; if(get_post_meta($post->ID, $key, true)){ echo get_post_meta($post->ID, $key, true); } else { the_title(); } ?></title>

    And then i just enter “title” in the custom fields in the post panel and write my own. If i don’t the post or page the_title will be displayed as the documents title (the else-value in the php..).

    Good luck and happy easter,

    Tommie Hansen
    Dekorfilm.se | Mindescape

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Posting question for noob’ is closed to new replies.