The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

2 Pages V  1 2 >  
Reply to this topicStart new topic
> Help extract links from a downloaded WordPress theme
shimmi
post Jan 9 2011, 12:42 AM
Post #1


Newbie
*

Group: Members
Posts: 10
Joined: 9-January 11
Member No.: 13,562



Hey guys. I know next to nothing about HTML, so i come seeking help here.

I am making a webpage using the wordpress plug-in. I downloaded and installed a WordPress theme from some random website. When i was looking over its HTML code, i noticed a bunch of links within it that lead to some design websites or whatever. There are like 2 or 3 of them, and that's only in the header. They do not appear anywhere on the site, however.
There is also a 'free antivirus' link somewhere in the code, but i haven't located it yet. It appears in my site description when I search for it on google, though. So basically what I need help with is getting rid of those links. Also, should I substitute them with mine? I don't know how HTML works with SEO..

Anyway, here is the code form the header. I highlighted the links that i want out:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "hxxp://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>

<head profile="hxxp://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />

<title><?php bloginfo('name'); ?> <?php wp_title(); ?></title>

<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/style.css" type="text/css" media="screen" />

<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />

<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />


Also, what exactly is the point of those links inside the code? What do they do? Because they cannot be seen on the site..


I have no idea where the 'free anti virus' link is located. I did see it appear on the site once when i was changing things around. It was at the bottom, so maybe it's hidden somewhere in the footer? However this is all that I have in the footer:


<?php eval(base64_decode(& #39;Pz4gPGRpdiBzdHlsZT0iY2xlYXI6Ym90aDsiPjwvZGl2Pg0KPC9kaXY+DQo8L2Rpdj4gPCEtLSBl
byBjb250ZW50IC0tPg0KDQoJPGRpdiBpZD0iZm9vdGVyIj4NCgk8ZGl2IGlkPSJmb290ZXItaW5uZXIi
Pg0KCTwhLS0gUGxlYXNlIGxlYXZlIHRoaXMgY3JlZGl0IGxpbmsgaW50YWN0IC0tPg0KCQk8cD48P3Bo
cCBibG9naW5mbygnbmFtZScpOyA/PiANCjw/cGhwIGlmKGlzX2hvbWUoKSkgOiA/ PjxhIGhyZWY9Imh0dHA6Ly9mcmVlYW50aXZpcnVzc29mdHdhcmVyZXZpZXdzLmNvbS8iIHRpdGxlPSJB
bnRpdmlydXMgc2NhbiI+QW50aXZpcnVzIHNjYW48L2E+PD9waHAgZW5kaWY7ID8+PC9wPg0KCQ0KCTwv
ZGl2Pg0KCTwvZGl2Pg0KDQoJDQoJPGRpdiBpZD0iY3JlZGl0Ij4NCgkJPCEtLSBQbGVhc2UgbGVhdmUg
dGhpcyBjcmVkaXQgbGluayBpbnRhY3QgLS0+DQoJCQ0KCTwvZGl2Pg0KCQ0KDQo8L2Rpdj4NCg0KPD9w
aHAgd3BfZm9vdGVyKCk7ID8+DQo8L2JvZHk+DQo8L2h0bWw+IDw/'));?>


Well this is pretty much it for now. Give me a hand, please.

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
shimmi
post Jan 9 2011, 12:44 AM
Post #2


Newbie
*

Group: Members
Posts: 10
Joined: 9-January 11
Member No.: 13,562



Here is where the Antivirus scan text can be seen:

http://www.google.com/search?q=http%3A%2F%...lient=firefox-a

My site is the first one on the list.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jan 9 2011, 02:30 AM
Post #3


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,458
Joined: 9-August 06
Member No.: 6



QUOTE(shimmi @ Jan 9 2011, 06:42 AM) *

Also, what exactly is the point of those links inside the code? What do they do? Because they cannot be seen on the site..

What links?


CODE
However this is all that I have in the footer:

<?php eval(base64_decode(& #39;Pz4gPGRpdiBzdHlsZT0iY2xlYXI6Ym90aDsiPjwvZGl2Pg0KPC9kaXY+DQo8L2Rpdj4gPCEtLSBl
byBjb250ZW50IC0tPg0KDQoJPGRpdiBpZD0iZm9vdGVyIj4NCgk8ZGl2IGlkPSJmb290ZXItaW5uZXIi
Pg0KCTwhLS0gUGxlYXNlIGxlYXZlIHRoaXMgY3JlZGl0IGxpbmsgaW50YWN0IC0tPg0KCQk8cD48P3Bo
cCBibG9naW5mbygnbmFtZScpOyA/PiANCjw/cGhwIGlmKGlzX2hvbWUoKSkgOiA/ PjxhIGhyZWY9Imh0dHA6Ly9mcmVlYW50aXZpcnVzc29mdHdhcmVyZXZpZXdzLmNvbS8iIHRpdGxlPSJB
bnRpdmlydXMgc2NhbiI+QW50aXZpcnVzIHNjYW48L2E+PD9waHAgZW5kaWY7ID8+PC9wPg0KCQ0KCTwv
ZGl2Pg0KCTwvZGl2Pg0KDQoJDQoJPGRpdiBpZD0iY3JlZGl0Ij4NCgkJPCEtLSBQbGVhc2UgbGVhdmUg
dGhpcyBjcmVkaXQgbGluayBpbnRhY3QgLS0+DQoJCQ0KCTwvZGl2Pg0KCQ0KDQo8L2Rpdj4NCg0KPD9w
aHAgd3BfZm9vdGVyKCk7ID8+DQo8L2JvZHk+DQo8L2h0bWw+IDw/'));?>



A likely culprit then, especially since it's encoded. Remove it and see what happens (make a backup first).

I wouldn't use that template if I were you. Surely it can't be hard to find templates for WordPress?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
shimmi
post Jan 9 2011, 12:13 PM
Post #4


Newbie
*

Group: Members
Posts: 10
Joined: 9-January 11
Member No.: 13,562



QUOTE
What links?



The ones that are in the code for the header. I bolded them. Here is the piece once again:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "hxxp://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="hxxp://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>

<head profile="hxxp://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />

<title><?php bloginfo('name'); ?> <?php wp_title(); ?></title>

<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/style.css" type="text/css" media="screen" />

<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />

<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />

These are all inside the code and they don't appear anywhere on the site. I'd like to get rid of them or replace them with my own links. Is there a way?

And these are the same links that i'm asking about. What is the point of them? What do they do? Why are they inside the code, yet appear nowhere on the site? Is that for SEO?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jan 9 2011, 01:02 PM
Post #5


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,458
Joined: 9-August 06
Member No.: 6



Oh, that! The first "tag" is your doctype (document type declaration) and the link leads to the DTD (Document Type Definition) it refers to (go there and see for yourself). All HTML documents should have a doctype. It declares what flavor of (X)HTML the document is written in.

I've never used a profile, but you can read about that here.
http://www.w3.org/TR/html4/struct/global.html#h-7.4.4.3
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Barthal
post Jan 10 2011, 06:30 AM
Post #6


Member
***

Group: Members
Posts: 50
Joined: 22-November 10
Member No.: 13,209



Your source shows this
CODE
    <div id="footer">
    <div id="footer-inner">
    <!-- Please leave this credit link intact -->
        <p>Paid Surveys Reviews
<a href="http://freeantivirussoftwarereviews.com/" title="Antivirus scan">Antivirus scan</a></p>
    </div>
    </div>


If it's not in your html then it must be some script doing it

This post has been edited by Barthal: Jan 10 2011, 06:31 AM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
shimmi
post Jan 10 2011, 07:02 PM
Post #7


Newbie
*

Group: Members
Posts: 10
Joined: 9-January 11
Member No.: 13,562



QUOTE
Oh, that! The first "tag" is your doctype (document type declaration) and the link leads to the DTD (Document Type Definition) it refers to (go there and see for yourself). All HTML documents should have a doctype. It declares what flavor of (X)HTML the document is written in.

I've never used a profile, but you can read about that here.
http://www.w3.org/TR/html4/struct/global.html#h-7.4.4.3



So if i'm understanding you correctly, the doctype line should be left alone and that having a link in there is completely normal?


QUOTE
If it's not in your html then it must be some script doing it


I will try removing everything from the footer and see how that works.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
shimmi
post Jan 10 2011, 07:09 PM
Post #8


Newbie
*

Group: Members
Posts: 10
Joined: 9-January 11
Member No.: 13,562



Barthal, I removed the gibberish that was in the footer and replaced it with the code that you posted. Then I just removed the line with the link, and it seems to be gone for good now! Thanks!

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jan 10 2011, 07:31 PM
Post #9


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,458
Joined: 9-August 06
Member No.: 6



Yes, you should absolutely keep it. you need it for validation and even of you don't care about that it's used for something called "doctype switching" which affects how the page renders in different browsers.
http://hsivonen.iki.fi/doctype/

There you see, it was the encoded stuff. Didn't you dare to remove it before? wink.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
shimmi
post Jan 10 2011, 07:47 PM
Post #10


Newbie
*

Group: Members
Posts: 10
Joined: 9-January 11
Member No.: 13,562



I did like you told Pandy, and removed all of it. biggrin.gif A chunk of the page went missing, so i just copied what barthal posted and it came back. Then i just removed the line with the link and its gone now. Thank you guys.

I have another question now. My front page is pretty much a blogpost, and what i'd like to do is remove the "By admin, January 7, 2011" and "0 Comments" and "Uncategorized" lines from it. I stumbled across a page that said how to do it, but i lost the link sad.gif Any ideas how I can remove those 3 things from the post?

Here is the code from my single.php:

<?php $dateFormat = get_settings('date_format'); ?>
<?php get_header(); ?>


<div id="content">
<div id="content-inner">

<div id="main">

<?php if (have_posts()) : ?>

<?php while (have_posts()) : the_post(); ?>

<div class="post" id="post-<?php the_ID(); ?>">


<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>

<div class="authormetadata">


By <?php the_author_posts_link(); ?>, <?php the_date($dateFormat); ?>
</div>

<div class="entry">
<?php the_content(__('Read more &raquo;')); ?>


<div style="clear:both"></div>
</div>



<div class="postmetadata">
<?php if (get_the_tags()){?>
<p>Tags: <?php the_tags('') ?></p>
<?php } ?>
<p><img style="vertical-align:-5px;" alt="categories" src="<?php bloginfo('template_directory'); ?>/images/category.gif" height="16" width="16" /> <?php the_category(', ') ?> <?php edit_post_link('(edit)',' ',''); ?></p>

</div>


<?php comments_template(); ?>


</div>





<?php endwhile; ?>



<div id="navigation">
<div class="fleft"><?php next_posts_link(__('&laquo; Older')) ?></div>
<div class="fright"> <?php previous_posts_link(__('Newer &raquo;')) ?></div>
</div>



<?php else : ?>

<div class="post">
<div class="entry">
<h2><?php _e('Not Found'); ?></h2>
<p><?php _e("Sorry, you are looking for something that isn't there."); ?></p>
</div>
</div>

<?php endif; ?>




</div> <!-- eof main -->

<?php get_sidebar(); ?>

<?php get_footer(); ?>



I'm not sure if single.php is the right place to work with, but it's the one that makes the most sense, at least to me biggrin.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jan 11 2011, 03:19 AM
Post #11


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,458
Joined: 9-August 06
Member No.: 6



Looks like you have gotten rid of some of those things on the other pages. How did you do it then? Isn't the template you posted above used for all blog entries? I've never used WP, but I'd expect some options when making the entry in the first place, or when editing it.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
shimmi
post Jan 11 2011, 02:12 PM
Post #12


Newbie
*

Group: Members
Posts: 10
Joined: 9-January 11
Member No.: 13,562



Yea, i got rid of those things on my 'Pages'. I was expecting for them to disappear from 'Posts' as well, but they didn't. This is why I think I need to play around with singe.php, because it contains code for single blog posts, like the one on the front page. I guess ill do a back-up and see what happens when I take out some lines of code. The problem is, though, i'm not really sure which lines of code should i target and which i should leave alone blink.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
wgabrie
post Jan 11 2011, 05:28 PM
Post #13


Advanced Member
****

Group: Members
Posts: 148
Joined: 11-July 10
Member No.: 12,279



I notice that the bolded portions of the code in the opening post contain "hxxp" with "x" instead of "http" with "t"

I ran the footer code, posted in the opening post, through a Base64 decoder and the decoder says the code returns this:
CODE
?> <div style="clear:both;"></div>
</div>
</div> <!-- eo content -->

    <div id="footer">
    <div id="footer-inner">
    <!-- Please leave this credit link intact -->
        <p><?php bloginfo('name'); ?>
<?php if(is_home()) : ?><a href="http://freeantivirussoftwarereviews.com/" title="Antivirus scan">Antivirus scan</a><?php endif; ?></p>
    
    </div>
    </div>

    
    <div id="credit">
        <!-- Please leave this credit link intact -->
        
    </div>
    

</div>

<?php wp_footer(); ?>
</body>
</html> <?


This post has been edited by wgabrie: Jan 11 2011, 05:31 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
wgabrie
post Jan 11 2011, 05:40 PM
Post #14


Advanced Member
****

Group: Members
Posts: 148
Joined: 11-July 10
Member No.: 12,279



A Wordpress theme is made up of several Template files put together (more: Stepping Into Templates).

You can have custom made template files, which makes finding the rouge link difficult, but you can also look at the existing Picture of the Template Hierarchy(from: Template Hierarchy article) to help you figure out where the link might be placed to be visible when different parts of your wordpress website are used.

This post has been edited by wgabrie: Jan 11 2011, 05:42 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jan 11 2011, 10:37 PM
Post #15


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,458
Joined: 9-August 06
Member No.: 6



Yeah, but this is about a single post, isn't it?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jan 11 2011, 10:44 PM
Post #16


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,458
Joined: 9-August 06
Member No.: 6



Oh, wait! You mean you can use choose what template to use for each post?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
shimmi
post Jan 15 2011, 06:45 PM
Post #17


Newbie
*

Group: Members
Posts: 10
Joined: 9-January 11
Member No.: 13,562



QUOTE
I notice that the bolded portions of the code in the opening post contain "hxxp" with "x" instead of "http" with "t"


Ah, yes, I did that because i thought those links were to spam sites. Apparently they aren't.

Thank you for the links, wgabrie.

The antivirus link was in the footer. I managed to get rid of after Barthal posted the decoded footer info.

Pandy, no, i can only choose the template once and then it's used for every post. However, in my WP backoffice where i can edit html, i can choose different parts of the template that i want to edit (like footer.php, header.php, index.php, single.php, etc.)

single.php is where code for single blog posts is contained. That's where i believe i can find and delete the date and 'posted by' lines. Have to figure out where they are first though biggrin.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jan 15 2011, 07:12 PM
Post #18


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,458
Joined: 9-August 06
Member No.: 6



OK, so why then is the post on the front page different than the others that don't have the "posted by" line? unsure.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
shimmi
post Jan 15 2011, 07:53 PM
Post #19


Newbie
*

Group: Members
Posts: 10
Joined: 9-January 11
Member No.: 13,562



Because all the others are 'pages' that added. The home page is the main page where the wordpress blog itself is located, so when I make a blog post, it shows up on that 'home' page. All the other ones are just additional pages that are separate from the blog posts.

This post has been edited by shimmi: Jan 15 2011, 07:54 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jan 15 2011, 08:21 PM
Post #20


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,458
Joined: 9-August 06
Member No.: 6



OK. You said earlier that you found a way to make that line go away on those pages, but in reality you never added it then.

This is to confusing for me. I think I'll go to bed. blush.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

2 Pages V  1 2 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 10th December 2019 - 04:07 PM