Wordpress and Webdesign Forum go41 » WordPress Code Snippets

  1. LaaLaa Monroe
    Member

    This week I've just launched my new blog but there's one issue I'm currently having that I'd love to know if it can be solved.

    If you see on my blog Dolce Vanity the top post is always full, when I had someone look at my blog they edited so the front-list had an excerpt but the big issue was if there was an image within the post it wouldn't show it in the excerpt even though it was before the text.

    So now it's been reverted back somewhat and I'd love to know if there was a code to change in the PHP to allow the top post to have an excerpt like my column posts or
    even take away the front post so every post goes into the column instead ?

    I'd be forever grateful on the help as it's beginning to drive me insane.

    Thank You.

    Posted 1 year ago #
  2. As I see on your blog you show in the topmost (latest) post the_content with the images in there. This is the post put out in index.php inside the div id="front-list".

    The following posts in div id="paged-list" show only one image and the excerpt.
    You know this already...

    In div id="paged-list" is a code to get the first image of your post or get your custom image from the custom field, whatever you set in theme admin panel. Following to this image is here in paged-list <?php the_excerpt() ?>.

    In the upper part of index.php the stuff works different, it will show the_content and you might additionally give it an image via the custom field 'Image'
    In front-list is no code to get an image from the posts content, so by replacing the_content with the_excerpt you get just a short text and no image.

    So if you use just the excerpt you have to set an image manually via the custom field and set in themes admin panel to use image from custom field plus the size you like to have it.

    You might use the auto insert function for images in the lower paged-list, this works not in front-list because there is no code for this.

    I can't explain you easily how to get this auto-insert-code to the first post. It can't be done just by copy and paste from below to up because of the size values it reads from different admin settings.

    First I would try to set an image in the custom field and tell the theme to use it with the size you set somewhere. If you get this to show up on top of your latest post,
    I would replace <?php the_content('Read the whole story »'); ?> with <?php the_excerpt() ?> in index.php to show only some text below.

    Another way would be to delete the complete div id="front-list" stuff and remove the offset in paged-list to show all posts and not starting with the second one.

    KEEP YOUR ORIGINAL THEME FILES IN A SAFE PLACE AS BACKUP FIRST OF ALL!

    Posted 1 year ago #
  3. LaaLaa Monroe
    Member

    Thanks so much for your reply but I must be doing something wrong.

    I have two paged-list divs and when I remove the offset from either or one my bottom footer cuts offs

    Posted 1 year ago #
  4. looking at your site it looks ok now?

    removing the offset can be done by just setting it from $myOffset = 1; to
    $myOffset = 0;

    you have two paged-list divs first one is after

    if ( $column != "one" ) { ?>

    <div id="paged-list">

    means you set to show NOT "one" column.

    but you have one column so it's the lower page-list you have to edit after:

    <?php } else { ?>

    <div id="paged-list">

    following this just change $myOffset = 1; to $myOffset = 0;

    Actually I do not use Arthemia Premium, I just 'read' the index.php..

    Posted 1 year ago #
  5. LaaLaa Monroe
    Member

    OMG It works you are an absolute genius thank u ever so much, my praises forever.

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.

Join us! or log in (lost password?):