• Hi

    I can display with the code below the rows from my mysql table I would like to display the url to open a specific page for each row with rewrite url (better than page.php?id=XXX)

    Using if possible the post page template of WordPress

    Thanks for your help

    global $db;
    $row = $db->get_results( "SELECT * FROM table1 order by Name");
    foreach ( $row as $rows ) 
    {
    echo '<a href="'.$rows->Name.'-'.$rows->ID.'">'.$rows->Name.'</a><br />';
    }
    • This topic was modified 6 years, 2 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Everything else WordPress topic
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘display url from custom WordPress table’ is closed to new replies.