csleh
Forum Replies Created
-
YOu have edit the template to change the links. The main menu is most likely in the header file.
Forum: Fixing WordPress
In reply to: automatically add character after linkyes, but I was hoping for something to add to the code so that IE users would see it.
I’ve read in the codex that some tags allow for outputing a character before or after, but I’m not sure where I could add that to the above — when I try the whole site goes white screen.
Forum: Themes and Templates
In reply to: Complete post archive pageDo you mean a full listing of posts in a certain order? Try this:
Forum: Fixing WordPress
In reply to: how do I add subcategory links to postsGot it. I did one of these for each area to be displayed:
<?php $posts = get_posts( "category=7" ); ?> <?php if( $posts ) : ?> <h2 class="lineabove">Newsletter</h2> <?php foreach( $posts as $post ) : setup_postdata( $post ); ?> <p><a href="<?php the_permalink() ?>" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></p> <?php endforeach; ?> <?php endif; ?>Probably there’s a neater way to do this, having the h2 auto-generated to the category name. Or maybe having all of the categories on one php call, but this works just fine as long as the client doesn’t change the category name.
Forum: Themes and Templates
In reply to: Graphic Background With Text And Links In A WordPress Page?Once you put in a background image just ignore it for now. that image has no effect itself on layout.
Links and text are treated exactly like any other links and text in a template page.
As far as how wordpress works, what you want is no different than calling in content from any other post. Your real issue is having a custom template page for this post only, and css styling.THere’s probably a million ways to solve this problem. Here’s what I would do:
Put all content in a post. Assign classes to each paragraph, or more probably make each a different heading type and apply a class to that. I would do that only because when editing a post in html view I can actually see the <hx> tags and add class easier.
Make a custom template for that post. Probably means having a specific category, and a category template.
On the template page you can put in your custom css. I would not call headers/footers/anything else, but copy header and footer code into this template.
Style each header class to place the content where I wanted. As an example:
h1.headline {font-size:24px; color:#cccccc; position:absolute; top:6px; left:12px; text-align:center; background:red;}
If you use absolute positioning remember to make a wrapper div and give it position:relative.
Then in the template page call the content as you would for any post.
I highly recommend using firefox and firebug to try out css styling effects on the fly.
Forum: Themes and Templates
In reply to: Graphic Background With Text And Links In A WordPress Page?Good thinking on the text being separate from the image. Not only good for SEO, but easier to change — and if images are off for some reason the text is still there.
Since the image will be in the background of the div, text lays on top automatically. At that point it’s all a matter of styling.
This is really a general css question (not wordpress) so you might want to visit some sites on css for specifics. You could style <p>’s with margins and padding, add divs with floats, or absolutely position elements to get the effect you’re looking for.
Forum: Themes and Templates
In reply to: trying to change my themeNote that this requires access to an ftp program. Your site host should have directions for using ftp.
If you’re using an online ftp service through your host, you’ll do the first part there. When you log into WP again the theme will be a choice in the “design” tab.Forum: Fixing WordPress
In reply to: P tag surrounding my divs – No! Bad WPPerhaps you could use a custom field for the div? You could also generate a class for the field using an additional key. Haven’t tried it myself except with images. Seems like you could modify the code found here to check if there is a div before content, then the class would handle the layout.
http://justintadlock.com/archives/2007/10/27/wordpress-custom-fields-adding-images-to-postsLet us know what you find that works.
Forum: Themes and Templates
In reply to: Wrap Issue (I think?)Take out the background from the wrap in you theme style sheet. You can copy this code to replace the first two styles:
body { font-size: 10pt; font-family: georgia,times,'times new roman', serif; background: #713600; color: #303324; text-align: left; margin: 0; padding: 0; line-height: 140%; } #wrap { padding: 0 5px; clear: both; width: 960px; margin: 0 auto; }Forum: Themes and Templates
In reply to: images not aligning properly…and you don’t need to manually add the spacing before and after, let the css handle it automatically:
img {border:0; padding:0; margin:12px;}that will add spacing to all — top, right, bottom and left
For unequal spacing, try this:
img {border:0; padding:0; margin 14px 8px;}that will give more on top and bottom. Personally, the 5px looks like not enough so I put 8px here.
Forum: Fixing WordPress
In reply to: can this be made to an if else statementYou are my hero!
I knew it didn’t make sense for images to break the rest of the page. I am learning more each time — maybe site 50 I’ll have this code thing down.
Thanks for your help, works a treat.
Forum: Themes and Templates
In reply to: Calling Different HeadersI am not an expert but have you tried
<?php include ('sidebar2.php'); ?>using an include instead of get-header
I think that’s how you pull in non-wordpress-standard page names.
Probably also you need this bit of code on top of each custom header page with the appropriate name
<?php /* Template Name: Archives with Content */ ?>Forum: Themes and Templates
In reply to: Right Sidebar Not Top Aligning… Not sure why. Help?what browser are you using? Viewing in camino the right sidebar looks the same as the original version. Perhaps there is an ie bug?
Forum: Fixing WordPress
In reply to: get category outside the loop — code difficultylooking for something completely different, found this on “the undersigned” blog:
`<?php if ( is_single(’slug’) ) { ?>
<img src=”” alt=”” / />
<?php } ?>’works like a charm!
Forum: Fixing WordPress
In reply to: get category outside the loop — code difficultyOK, I don’t need to do this — was overthinking the issue. I found some conditional tags that do the trick BUT if I try to use an image instead of just text, the site below the header comes back blank. For every page, even the ones in a different category.
So new question — how can I use an image in a conditional comment as seen below?
<?php // let's generate info appropriate to the page being displayed if (in_category(9)) { echo "<p>we are in category automation</p>"; } elseif (in_category(8)) { echo "<p>we are in category test</p>"; } else { echo "<p>this is anything else</p>"; } // That's all, folks! ?>I’ve tried:
echo "<img src="<?php bloginfo('template_directory'); ?>/images/brose1.jpg" alt="test system image" />";<img src="<?php bloginfo('template_directory'); ?>/images/brose1.jpg" alt="test system image" />;(no echo)`echo “<img src=”fullurlcopiedfrombrowser.jpg” />;
The image does display — if you visit the site you’ll see the text is on top of that image. So link seems correct.