Wordpress and Webdesign Forum go41 » WordPress Code Snippets

  1. omerkhan01
    Member

    Hi Joern,

    I have two final questions. As you can see my CMS is turning out exactly the way my client wanted it. You can see here.

    Just two questions.

    I want to put a header logo. Now would you simply go into index.php and after get header.php

    Put an <img src="abc.jpg"></img> and set the logo at the top like that

    or create a div in the main index.php

    Like in the same position like

    <div class="toplogo"

    <img src="http://www.abc.com/abc.gif"></img>

    </div>

    and then basically

    in CSS

    Put .toplogo

    and then configure the properties here?

    Sedondly, I want to add a "read more" link or button after my Frontpage post snippet and I can't seem to do that.

    I tried the advanced excerpt plug in
    I also tried to use WP's built in read more function by inserting it into the HTML version of my post and no read more link is shown on my post.

    I think it is because in index.php

    there is no

    "<read more>" code in the write post area write.

    to create a link

    Please advise.

    Omar

    This site is almost done.

    NOTE: i figured out the logo think.

    What I did was remove

    <img src="<?php echo get_post_meta($post->ID, "Thumbnail", true);?>" height="80" width="80" align="left"/>
    <?php the_content_rss('', TRUE, '', 35); ?>

    From index.php and replaced them with.<?php the_content( $more_link_text); ?>

    Then what happens is in your post.

    Wherever there is a
    that is where you put a read more link. Or rather the code does it. It is also cool, my advanced excerpt plug in because it tells you how many words the article is and how long it would take to read it, how many images, etc.

    My only two questions remaining boss are.

    1. How to add a top banner logo. Referenced from before.

    2. Also, I want to take the page navigation bar menu options

    and put them like on top, right, like at my client's old site.

    3. Lastly, how to change the link of the read more link. I am assuming something of course in CSS like a link color or something right?

    After these three things and adding one adsense Ad, I will have effectively restored my client's blog and made it much better. I also added a cool contact tab that follows you around, as I am developing for my real estate client.

    Thanks man

    Omar

    Posted 1 year ago #
  2. the banner: in your header.php is already the full code for a clickable banner, you just removed the original image (images/backgrounds/topbanner.gif)

    the reference for this is in style.css

    #branding {
    background:url("images/backgrounds/topbanner.gif") no-repeat scroll 0 0 transparent;
    height:100px;
    padding-bottom:15px;
    width:625px;
    }

    putting your logo as topbanner.gif in the size given above (625x100px) in this folder would solve your problem without much work.

    The read more link: actually you removed the thumbnail image and an excerpt with about 35 words. Now you show the 'advanced excerpt' content with a read more link. This additional link brings you to the same post like the title link above, that's okay. But how many words, images etc, is that important?

    in the right column you still have

    <?php the_content_rss('', TRUE, '', 35); ?>

    add just below this the_content_rss the following:

    <span class="post-teaser-more"><a href="<?php the_permalink() ?>" rel="bookmark" title="Read: '<?php the_title(); ?>'">Read the story: <?php the_title(); ?></a></span>

    and it will look like here: http://www.go41.de/

    to change the look of your current more link or the one above, use in style.css this with any values you learned already

    .post-teaser-more {
    line-height:20px;
    margin:0;
    padding:0 0 15px;
    }

    as these links are in a <span class="post-teaser-more">

    this menu bar stuff
    it's all about style.css, I do not want to analyze one site and tell you what to change on your site.
    easiest is in your style.css, find
    #nav li {
    float:left;
    list-style:none outside none;
    }
    and change to
    #nav li {
    float:right;
    list-style:none outside none;
    }
    this makes all list items (pages come as a list) just move to the right.

    to get it red with some space (margin) between like this
    #nav li {
    background:none repeat scroll 0 0 #A91C1D;
    float:right;
    list-style:none outside none;
    margin-left:12px;
    }

    btw: your black background makes with black text your single post unreadable!

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.

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