Need help with WP code anyone able to help?

alc

New member
Mar 3, 2007
300
2
0
I am trying to change the logo of WP that is in a WP theme I was able to change the anchor text and url destination but not the small WP logo next to the anchor text. I changed it from the themes editor page here is the footer page code before my changes can anyone help thanks?

</a>
</div><!-- #site-info -->
<div id="site-generator">
<?php do_action( 'twentyten_credits' ); ?>
<a href="<?php echo esc_url( __('http://wordpress.org/', 'twentyten') ); ?>"
title="<?php esc_attr_e('Semantic Personal Publishing Platform', 'twentyten'); ?>" rel="generator">
<?php printf( __('Proudly powered by %s.', 'twentyten'), 'WordPress' ); ?>


I also want to delete the text that comes up on all posts like " posted by and on date " something like that can anyone help thanks?
 


NOT TESTED
Looks like you're using the twenty ten theme so, to get rid of the 'posted by ...' stuff I think you just need to edit loop.php and take out references to twentyten_posted_on()

... as I said, I haven't tested this so use at your own risk ... maybe try it on a local first.
 
In regards to getting rid of the posted by / date stuff, the most non destructive way to do this is w/ CSS if you're not comfortable editing PHP. In the twenty ten theme, the class for that is called "entry-meta". Simply add this line into your style.css file and it will go away.

.entry-meta {display:none;}

This file is located here if you are unfamilar w/ WP's structure - wp-content/themes/twentyten/style.css

In regards to your question about the logo, I didn't really get what you were saying. Are you talking about the Powered by Wordpress thing in the footer?
 
I applied twenty ten to one of my sites real quick to see what you were talking about, assuming this is in the footer. That little WP logo is being defined as a background image for the containing div:

Specifically

#site-generator a (line 1201)
{
background-color: transparent;
background-image: url("http://www.wickedfire.com/images/wordpress.png");
background-repeat: no-repeat;
background-attachment: scroll;
background-position: left center;
color: #666666;
display: inline-block;
line-height: 16px;
padding-left: 20px;
text-decoration: none;
}


You could either

a) yank out all of the elements defining the background for the site-generator div to get rid of it

b) replace wordpress.png with another image inside twentyten/images/ (or create a new image and change the background reference inside the CSS)
 
  • Like
Reactions: fm1234
Wow great thanks nvanprooyen for all the help you really know your shit got both thing done just like you said.

I do not have a code editor so I did it streight from the theme editor.

I do not want to bother but since I have you here I need help with just a bit more if ok with you.
I would also like to delete the bottom of post area were the " Posted in uncategorized | Tagged | leave comment | edit " is. If I do this will the tags not work as well? Or will I still get the tag benifit but will not show up in post?

Last I need to edit the font and font size of the text for the top of the header were my title shows up also the widget titles they are a bit small and look bad. Would I have to enter the new font style in wp font folder not sure?

Sorry for all the questions and thanks again.
 
Yep, nvanprooyen's solution was far more elegant than mine - excuse my chainsaw butchery ... I'm just used to hacking wordpress about.

I do not have a code editor so I did it streight from the theme editor.
if you're looking for an editor, notepad++ is fine for win pcs and it's free.


I would also like to delete the bottom of post area were the " Posted in uncategorized | Tagged | leave comment | edit " is. If I do this will the tags not work as well? Or will I still get the tag benefit but will not show up in post?
similar solution to the 'posted by' stuff - just add

display: none;

to the.entry-utility class in style.css so it looks like this:

.entry-utility {
clear: both;
color: #888;
font-size: 12px;
line-height: 18px;
display:none;
}

The tags won't appear on the page but, if you look in the Page source you'll see that they are still there.

Last I need to edit the font and font size of the text for the top of the header were my title shows up also the widget titles they are a bit small and look bad. Would I have to enter the new font style in wp font folder not sure?
not sure which title you mean... can you elaborate?

Maybe the easiest way to change to the size of the 'widget titles' is to find the widget-title class in style.css and change it to this:

.widget-title {
color: #222;
font-weight: bold;
font-size: 1.5em;
}

play around with the font-size: declaration until you're happy with the size etc.

hope that helps!
 
Great thanks will do.
What I meant on the header title is when you enter the title and desc. info when you go into the themes left side under the dashboard were the setting>general you see on top first is site title then tagline thats the actural info that comes up on the very top of the sites header that is the text I want to edit to use another font style. Now it comes up a very ugly normal simple text style. I am guessing if I want to use a different font style anywhere in the theme I would have to copy it somewhere into a font folder of the wp site with a ftp. I would like to do the same for the post titles as well.
I did find a cool widget for this called anyfont but not sure if I know how to use it or not but does not work the way I ant it to work.

Thanks to you guys I have been able to put up all of my sites and do light editing without knowing anything about coding thanks again.
 
all your fonts, sizes, colours etc. should be defined in your style.css

there are loads of tutorials on css out there, maybe work through a couple so you can get more comfortable with it.

to change the font of your site header, simply add something like this:

font-family:'Hoefler Text',Georgia,'Times New Roman',Times,serif;

to the #site-title declaration so it looks something like this:

#site-title {
float: left;
font-size: 30px;
line-height: 36px;
margin: 0 0 18px 0;
font-family:'Hoefler Text',Georgia,'Times New Roman',Times,serif;
width: 700px;
}

play around with the fonts until youre' happy.
 
Glad you got it all working :) Like wellyfish said, spend some time getting familiar w/ CSS. The few hr investment you make in that, will pay dividends over time and save you a lot of frustration.