views:

141

answers:

1

EDIT: Solved - was not flutter's tag stripping, should work as advertised.

I'm using Flutter (which creates custom fields) in Wordpress to display profile information entered as a Post. Before I implemented the CSS tables the link showed up and was clickable. Now I get nothing returned, even when I try to call the link outside the table.

If you know anything about this, here's my code in the index.php file and I remain available for any questions.

<?php if (in_category('Profile')) { ?>
<table id="mytable" cellspacing="0">

-snip-
<tr>
<th class="row1" valign="top">Website </td>
<td>Link: <a href="<?php echo get_post_meta($post->ID, 'FrWebsite', $single=true) ?>">  <?php echo get_post_meta($post->ID, 'FrWebsite', $single=true) ?></a></td>
</tr>
-snip-

</table>

Thanks, L

Edit: @Josh - there is a foreach looping construct in the table and it is reading and displaying the code correctly, I see what you're getting at now:

<tr>
<th class="row2" valign="top">Specialities </td>
<td class="alt" valign="top"><?php $my_array = get('Expertise');
      $output = "";

foreach($my_array as $check)
{
$output .= "<span>$check</span><br/> ";
}
echo $output; ?></td>
</tr>

Edit - @Josh - here's the old code as far as I can remember it, there was no major difference just a <td> tag where there now stands a <th>, there wasn't the class="" and there was no "Link:" and FrWebsite was called Website, but it still didn't work when called Website so I changed to see if that was the error.

<tr>
<td width="200" valign="top">Website </td>
<td><a href="<?php echo get_post_meta($post->ID, 'Website', $single=true) ?>"><?php echo get_post_meta($post->ID, 'Website', $single=true) ?></a></td>
</tr>
A: 

Where is $post set? What does the full table look like? Could be that when you changed the table structure you accidentally removed something like (line 2 below):

<table id="mytable" cellspacing="0">
<?php foreach($posts as $post) { ?>
<tr>
<th class="row1" valign="top">Website </td>
<td>Link: <a href="<?php echo get_post_meta($post->ID, 'FrWebsite', $single=true) ?>">  <?php echo get_post_meta($post->ID, 'FrWebsite', $single=true) ?></a></td>
</tr>
<?php } ?>

(Just guessing here...)

Josh
You might be on to something - I wish I understood the code more. After checking, the changes made to the table structure left nothing accidentally removed. I'm not sure how it worked before, without a foreach loop, but it did. And since putting some styling in place, this link isn't being echoed as it was.
Luke
@Luke: Can you post the old code?
Josh
@Josh: Old code posted, but as mentioned, nothing obvious (at least not to me). Have changed the link line slightly to `<td>Link: <a href="<?php echo get_post_meta($post->ID, 'FrWebsite', $single=true) ?>">Visit the website</a></td>` but now it's just linking to whichever page it's being displayed on.
Luke