www.webdeveloper.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 19

Thread: Is this possible

  1. #1
    Join Date
    Dec 2003
    Location
    UK
    Posts
    1,141

    Is this possible

    Hey, i installed a style on my wordpress blog and am wondering if this is possible, im not good with others code. At the top there is a black section that horizontally lists the categories what im looking to do is float a div to the right of that with an image link.

    Is that possible in that area?

    Here is the site - Vegan Blog

    Any help is appreciated as always

  2. #2
    Join Date
    Oct 2010
    Location
    Ohio
    Posts
    233
    i think that would be as easy as:
    Code:
    </ul>
       <a href="target"><img src="path/to/image.jpg" style="float:right"></a>
    </div>
    where the italic are the end of your ul and its containing div, and bold is the image link you want to insert

  3. #3
    Join Date
    Feb 2008
    Location
    NW Washington State
    Posts
    1,856
    What Derokorian says is more or less right, but you need to find the .php file that is used to construct that portion of the page, commonly the header.php file.
    You probably need a FTP program so that you can view all the files in the WP application so you can find the header.php file.
    Typically it will be
    Code:
    blog root folder
    	wp-content
    		themes
    			name of your theme
    				header.php
    If you need a little help getting thru your first modifications:
    http://jonathanwold.com/tutorials/wordpress_theme/
    Create your own theme or modify another one.
    Best of luck!
    Eye for Video
    www.cidigitalmedia.com

  4. #4
    Join Date
    Dec 2003
    Location
    UK
    Posts
    1,141
    Cheers for the help guys, i will give it a shot.

  5. #5
    Join Date
    Oct 2010
    Location
    Ohio
    Posts
    233
    yeah sorry i coulnd't point you to the file to add that to, but I've never used wordpress, i just saw what to add based on the output it generates heh.

  6. #6
    Join Date
    Dec 2003
    Location
    UK
    Posts
    1,141
    unfortunatly it doesnt work adding the code in, for some reason even with the correct image path the image doesnt show and it skews the layout, the logo goes higher.

    cheers for trying though appreciate it.

  7. #7
    Join Date
    Feb 2008
    Location
    NW Washington State
    Posts
    1,856
    Well you have to remember that WP is taking a bunch of php files and using them to build the page. So what might appear as the correct path to the image, most likely is not, since the theme is buried a number of folder layers deep but is displayed in the root level of the blog.
    When adding in your own images or videos, you might want to create a special "images" folder in the root level and when accessing those images, use the absolute address to the folder/image. The image WILL show.
    If the layout changes, it's because of the styling applied to that <div> or <div>s. A themes styles sheet is in the same folder as the header.php, usually named style.css.
    Open that up and add, change the CSS styles as needed. You can get the logo to display just as you want it... it may take a little trial and error but it will work.
    Best wishes,
    Eye for Video

  8. #8
    Join Date
    Oct 2010
    Location
    Ohio
    Posts
    233
    Also, as eye said you can make sure to use the abolute path

    Code:
    <img src="<?=$_SERVER['host']?>/path/to/image.jpg">

  9. #9
    Join Date
    Dec 2003
    Location
    UK
    Posts
    1,141
    all i added was <a href="target"><img src="path/to/image.jpg" style="float:right"></a>

    But with the correct absolute path to the image, no image showed and the layout went skewed.

  10. #10
    Join Date
    Feb 2008
    Location
    NW Washington State
    Posts
    1,856
    Well the absolute path would include http://www.yoursite.com/your_special...image_name.jpg
    The layout will need to be corrected in the style.css file for the class
    class="catmenu"
    Put the image and link back in the then comment it out
    Code:
    <!-- <a href="target"><img src="path/to/image.jpg" style="float:right"></a> -->
    so we can actually see what the code looks like. If it's not there, it's pretty tough to figure out how to fix it.
    Visit:
    http://www.worldbarefootcenter.com/barefootblog/
    view the source code, look for
    Code:
    <div id="header" role="banner">
    for an example of using an image as a link in a WP Blog.
    Of course you still need to style it, but first get it to display.
    Best wishes,
    EfV

  11. #11
    Join Date
    Aug 2010
    Location
    Ohio
    Posts
    136
    using the http: path simply means that its not trying to find the image based on the file being viewed.
    Last edited by NoasIT; 03-31-2011 at 12:59 PM.

  12. #12
    Join Date
    Oct 2010
    Location
    Ohio
    Posts
    233
    The reason absolute pass should start at http: for this is because starting with a folder name or backslash makes it relative to the parent calling script, which may or may not be the path you expect. If you can type in your browser window http://www.mydomain.com/path/to/image.jpg and see your picture that's the path you want to use (at least to get it working). Then you can try to figure out the path relative to the calling script if you like, personally I always use absolute paths for images and style sheets.

  13. #13
    Join Date
    Feb 2008
    Location
    NW Washington State
    Posts
    1,856
    Typically for static sites a relative address works just fine, but if you are new to WP, trying to accurately path the dynamic address can be a little challenging... so the short-cut is to use absolute..
    Well you have to remember that WP is taking a bunch of php files and using them to build the page. So what might appear as the correct path to the image, most likely is not, since the theme is buried a number of folder layers deep but is displayed in the root level of the blog.
    Using the absolute address for a custom photo in WP WILL get that image to display.
    Best wishes,
    EfV

  14. #14
    Join Date
    Dec 2003
    Location
    UK
    Posts
    1,141
    hey this time ive added the code in and it hasnt changed the layout but image still not showing.

    Image - Image

    Site - Vegan Health Blog

    Appreciate the help everyone.

  15. #15
    Join Date
    Oct 2010
    Location
    Ohio
    Posts
    233
    hmm well im stumped cause its right there in view source... sorry
    ~Ryan
    www.rdennispallas.com <-- Personal Site, changing regularly cuz its ugly.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles