Longtime reader of stackoverflow but first question.
I'm working with Wordpress (specifically thesis theme) in the custom_functions.php file and am finding for some reason is automatically adding the current page url. For example this code is to query the database and then loop through outputting each product in it's own div:
$result = db_connection($query);
while ($row = mysql_fetch_array($result)) { ?>
<div class="box"><a href="">
<img src="http://www.electricbikehub.co.nz<?php echo $row['product_root_directory'] . $row['mid_size_image'] ?>">
<h2><?php echo $row['name']?></h2>
<p><?php echo $row['description_brief'];?></p>
<p><span class="multiple_product_red"><span class="multiple_product_linethrough">RRP: <?php echo $row['list_price']; ?>.</span> Our discounted price: <?php echo $row['our_price']; ?>. Includes delivery and GST.</span></p>
</a>
</div>
<?php } ?>
As you can see 3rd line says href="" but the actual link being generated is the current page (in this case 'http://www.electricbikehub.co.nz/?page_id=1192'). If I add anything in the href, such as href="something" it will just add it to the end, ie http://www.electricbikehub.co.nz/?page_id=1192something.
Any help would be greatly appreciated!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…