Wordpress and Webdesign Forum go41 » WordPress Code Snippets

  1. ade
    Member

    Hi,

    First of all, I'd like to say thanks for this forum, having no clue about html it helped me customize Arthemia a little bit. However, I'm still struggling with a couple of things.
    The main one being that I can't get the thumbnail to show up, but when I click on the picture it does appear, I've tried a few things but it does not work.

    I've also tried to change the page navigation bar, editing this
    /* Navigation Bar*/
    #navbar {
    margin:0 auto;
    margin-top:15px;
    padding:0px 10px;
    text-transform:uppercase;
    background:#2c2c2c url(images/navbar.png);

    but it remins black

    And one last thing is that I managed to delete comment and date on the Headline category, but would like to delete on every post. Alternatively, is there a way to have pages appearing on the home page rather than post; I'd like my site to look something like this one http://www.bipolarscotland.org.uk/

    Thank you

    oh, here's my website (a test) http://partirenaustralie.com/

    Posted 1 year ago #
  2. about the image
    the path you entered in the custom field looks correctly and the image is there. So the problem seems to be with the timthumb script.
    the folder where timthumb.php is in (/scripts) should have the folder permission 755 and the file timthumb.php the file permission 644
    the folder /cache should have 755 or 777, depends on your server, mine is working well with 777 for cache folder.
    If you can somehow get the error.log file of your server, look at it and it will tell you what is going wrong!

    The navigation bar will stay black as long you have the black background image navbar.png loaded:
    background:url("images/navbar.png") repeat scroll 0 0 #2C2C2C;

    You might remove the image in style.css like this (just grey here)
    background:none repeat scroll 0 0 #CCCCCC;

    I normally change that image itself to another color (see http://gadgets.ezxplain.com/ ) and use navbar.png in another design.

    The comment and date in all posts in index.php is created by this line

    <div class="meta">[<?php the_time('j M Y') ?> | <?php comments_popup_link('No Comment', 'One Comment', '% Comments');?> | <?php if(function_exists('the_views')) { the_views(); } ?>]</div>

    you find this line three times in index.php of arthemia, you removed only the first one.

    you can show pages anywhere on your home page (index.php), where do you mean?

    Bipolar is showing posts, they use a green navbar.png ( http://www.bipolarscotland.org.uk/wp-content/themes/arthemia/images/navbar.png )

    Actually using WordPress I would go for posts in categories, not pages and sub-pages!

    Pages will not show up in your feed, try your feed icon...

    Posted 1 year ago #
  3. ade
    Member

    Thanks a lot! Nav bar and comments sorted!
    For the thumbnails it doesn't seem to work. I've changed the folder/timthumb permission in ftp but no changes.I also tried to modify those lines with every combinations but no changes; maybe i am not modifying the right lines?

    function check_cache ( $cache_dir, $mime_type ) {

    // make sure cache dir exists
    if( !file_exists( $cache_dir ) ) {
    // give 777 permissions so that developer can overwrite
    // files created by web server user
    mkdir( $cache_dir );
    chmod( $cache_dir, 0777 );
    }

    show_cache_file( $cache_dir, $mime_type );

    AND

    function show_image ( $mime_type, $image_resized, $quality, $cache_dir ) {

    // check to see if we can write to the cache directory
    $is_writable = 0;
    $cache_file_name = $cache_dir . '/' . get_cache_file();

    if( touch( $cache_file_name ) ) {
    // give 666 permissions so that the developer
    // can overwrite web server user
    chmod( $cache_file_name, 0666 );
    $is_writable = 1;
    }
    else {
    $cache_file_name = NULL;
    header( 'Content-type: ' . $mime_type );
    }

    if( stristr( $mime_type, 'gif' ) ) {

    I also checked the error log in my server but it's empty.

    For showing pages on the home page rather than posts I meant that I'd like the categories Headline and featured showing pages( ideally, some of the featured will link to the same page as the one in the menu: for example on of my page will be "destination guide> Queensland" in the scroll down menu, and so would be one of the feature post).
    I also changed the category bar for pages as it is going to be a static site and I had read that it was not really good for SEO to have posts that are not updated or not to have new content. But I'm new in all this, so if you have any suggestions, they're more than welcome!

    Posted 1 year ago #
  4. I just see you use a .png file as image, I would try with .jpg.
    -and the file ...wp-content/uploads/2010/09/Ozgeneral.png is even not there anymore (It was there before..)

    as the timthumb script is still developed you could try the latest version you get here:
    http://code.google.com/p/timthumb/
    use right mouse and save target as for this link
    http://timthumb.googlecode.com/svn/trunk/timthumb.php

    replace that file with the one on your server after making a backup of the one you use.

    This version of timthumb can even cache external images from flickr and others, but you need one more folder called temp beside the cache folder
    ...\themes\arthemia\scripts\temp
    this folder has to be writetable too (777 or 755)!

    setting folder permissions I would use a ftp program like filezilla, do not modify script files!

    to show one pages in headline replace the query:

    <?php query_posts("showposts=1&category_name=Headline"); ?>

    with a query for just one page, if you know the ID (here ID is 5) use

    <?php query_posts('p=5'); ?>

    to show four pages in featured section you have to replace the query for featured, again in index.php. Replace this single line:

    <?php query_posts("showposts=4&category_name=Featured"); $i = 1; ?>

    with these some lines for pages with IDs 3 and 5 and 7 and 15:

    <?php
    $args = array(
      'post_type' => 'page',
      'post__in' => array(3,5,7,15)
      );
    query_posts($args);
    ?>

    ANY ID YOU HAVE TO SET TO THE PAGE YOU WANT TO SHOW

    PLEASE BACKUP ANY FILES YOU WANT TO EDIT BEFORE DOING ANYTHING

    more inf here:
    http://codex.wordpress.org/Function_Reference/query_posts
    and here:
    http://wordpress.org/support/topic/how-to-retrieve-multiple-pages-using-query_posts

    talking about SEO it's of course better to update a site. With WordPress using posts this changes your frontpage without editing any .php files, older posts move down, the latest ones appear. Pages are really static, even by updating the content they will not change much.
    There might be no WP-theme showing static pages in front and the posts somewhere else, I guess they know why.

    Putting pages in the category bar was explained here a while ago:
    http://webdesign.go41.de/wordpress-tips/list-pages-custom-styling-in-arthemia-category-bar/

    Posted 1 year ago #
  5. ade
    Member

    Thanks a lot! The new timthumb scripts did the trick!
    As for SEO about pages and posts, I guess I'll just have to do some more reading!
    Thanks!

    Posted 1 year ago #
  6. If you like the design of arthemia you might find some good modifications of this theme here:
    http://themes.go41.de/downloads/

    there is a theme-switcher on top of every page to see different themes with the same content.

    Posted 1 year ago #
  7. ade
    Member

    Nice! I'll definitely use the sliding headline for another website! But that raises another question. How to get the logo extended like this http://themes.go41.de/?wptheme=aranovo2 ; when i try, it just pushes the advertising further down.

    Posted 1 year ago #
  8. in this Aranovo2 theme is an image as background for div id head.

    It is just behind the actual logo (here just text) and also behind the place for the add.

    create an image 960px wide and something from 100 to 140px high. Put it into your themes/arthemia/images/ folder as logowide.jpg (or .png)

    Having this image in place you have to edit your style.css, you have now:

    #head {
    font-size:0.7em;
    margin:15px auto 0;
    padding:0;
    width:960px;
    }

    change it to:

    #head {
    background:url("images/logowide.jpg") repeat scroll 0 0 #3875D7;
    font-size:0.7em;
    margin:15px auto 0;
    padding:0;
    width:960px;
    }

    and refresh you browser to see if it comes behind your current logo and behind the add.

    your div id="navbar" is inside the div id="head", in aranovo2 the navbar comes after this id head. Try it first as I suggested, if not satisfied remove one of the two /div above div id="page" and add it just above div id="navbar" (just move it)

    refresh to get the browser reloaded, on IE more than once

    Posted 1 year ago #
  9. ade
    Member

    oops, I'm really useless but I couldn't figure out how to replace the background/blue color by a photo/imag; If i only type background:url("images/logowide.jpg"), then it takes the same color as the rest of the site..... I definitely need to take some html courses!

    Posted 1 year ago #
  10. your image is a .png so the entry should be:
    background:url("images/logowide.png")

    after that change you should see your new image and can start to set width, height and margin/padding to get it aligned

    Posted 1 year ago #
  11. ade
    Member

    Great! Thanks

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.

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