Jump to content

Need help and advice for some important linking code


11Tami

Recommended Posts

Hello, need help with this, not sure how to do it. I need a text link on my page so that if it is clicked on

a few other text links will appear, then if they are clicked on others will appear and so on. But the tricky part is I also need the links to be followed like normal links are, by search engines. I know I could do some php that if such and such link on is clicked then do this and show the other text link. But how can they be listed so search engines will follow them, even if they aren't clicked on yet? Please let me know, thank you.

Link to comment
Share on other sites

Thanks I'll try. Maybe doing it visually will help.

The first text link on a page:

I am text link 1 that leads to another page. When I am clicked on two other text links appear

 

I am text link 2 that appears only when the first one was clicked on

I am text link 3 that appears only when the first one was clicked on

 

I am text link 4 that appears only when 2 was clicked on

I am text link 5 that appears only when 2 was clicked on

 

I am text link 6 that appears only when 3 was clicked on

I am text link 7 that appears only when 3 was clicked on

 

on it goes.

 

As shown certain next links only appear when some links are clicked on. All that I can pretty easily set up with php. Since I would probably need php "if" statements for example:

<?php
$1=<a href='http://thewebpageforthislinkhere'>I am text link 1 that leads to another page. When I am clicked on two other text links appear</a>;
if ($1)
{ echo "<a href='http://thewebpageforthelinkhere'>I am text link 2 that appears only when the first one was clicked on</a>";
echo "<a href='http://thewebpageforthelinkhere'>I am text link 3 that appears only when the first one was clicked on</a>";
}
?>

 

All that should work. But the part I am stuck on is how to get the big search engines to follow all these links? How to get the big search engines to read them all like regular links on any page and to follow them? Because it doesn't do a whole lot of good for me to set up a bunch of links if the biggest search engines can't even find their pages.

 

Please let me know, thanks.

Link to comment
Share on other sites

What you are trying to do will throw syntax errors.

<?php

echo "<a href='http://thewebpageforthislinkhere'>I am text link 1 that leads to another page. When I am clicked on two other text links appear</a>";

if (<a href='http://thewebpageforthislinkhere'>I am text link 1 that leads to another page. When I am clicked on two other text links appear</a>)

{ echo "<a href='http://thewebpageforthelinkhere'> I am text link 2 that appears only when the first one was clicked on</a>";

echo "<a href='http://thewebpageforthelinkhere'> I am text link 3 that appears only when the first one was clicked on</a>";}

?>

this whole thing is messed up.

Create your links like normal and use php around htem as needed.

Now you need to restructure the code as that's nothing that is going to run.

Now as far as google, it's going to follow them just as standard links.  Whether they are echo'd/printed in php doesn't matter.  They still are given to the end user the same (as xhtml/css output only).  The php is server side and does not affect search engines.

 

Link to comment
Share on other sites

Thanks I was adjusting that when you posted and I know it needs a bit of tweaking. Are you absolutely positive about that? I'm pretty sure the search engines won't follow them if the echos aren't pulled onto the page yet. The echos won't show on the page until one of the links is clicked on. Are you sure the search engines will follow a text link that is only in an "if" statement? Please let me know, thanks.

Link to comment
Share on other sites

If you do

<a href="http://www.phpfreaks.com" title="Freaks">The PHP Freaks</a>

and

<?php

echo '<a href="http://www.phpfreaks.com" title="Freaks">The PHP Freaks</a>';

?>

the search engines look at both of those exactly the same.

However with javascript (if you were building link with javascript for example) they are ignored by search engines.

As well as flash (to an extent).

Link to comment
Share on other sites

Yes you're right and why php should be the best way. I agree with your echo, I'm just not sure if they will still do it if its wrapped into an "if."  I can also try it as a last resort but the search engines take months before they include the pages, only to have this not work. Anyone know?

 

Please let me know, thanks.

Link to comment
Share on other sites

Bottom line, fact, unchangeable - Search engines do not care in any way shape or form whether it's standard xhtml spitting out the links or php.  If you had a use conditional statement spitting out hundreds of links based on specific criteria, every link that is spit out, is picked up by search engines as it was a standard link.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.