WordPress.org

Ready to get started?Download WordPress

Forums

add content automatically after each post, successful but need static content. (1 post)

  1. artdex
    Member
    Posted 1 year ago #

    Hi,
    Im using wordpress for one of my site. im using wordpress in-post template plugin to add some content automatically aft6er each post. I have successfully configured this and its working fine. I created one new table in wordpress database which contain website url , link title and text to display for that link. I have around 100 unique entries for this data and im showing only 4 in each post .

    $data=mysql_query("SELECT * FROM wp_craja ORDER BY RAND() LIMIT 4");
     ?>
    <section class="who-searchd"><p class="people-serch">Popular Coupons At </p><ul class="who-alsoseen"><?php while($info = mysql_fetch_array( $data )): ?><li><a title="<?php echo $info['merchant_title']; ?>" href="<?php echo $info['merchant_url'] ?>"><?php echo $info['merchant_name'] ?></a></li><?php endwhile; ?></ul></section></section>

    Im getting new 4 links each time i refresh the post. i want those links to be static for each post but randomlly fethced from my database only 4 each time. Please let me know how to do this.

    Thanks in advance

Topic Closed

This topic has been closed to new replies.

About this Topic