• So I have queried out some data from another DB and obviously they’re not a post which means I can’t use the standard permalink to link them to an existing page with it’s post type.
    So I thought that if WP could just generate an let’s say “artificial” post ID to link to a certain generated page like any other custom post type.

    So basically a generated page like when you do the_permalink but for data from another database that is and will not go into the WordPress DB as a post or whatsoever, the question would be if this is possible?

    My code so far:

    $result    = $newdb->get_results("SELECT ".$column1.",".$column2."  FROM ... LIMIT 1 ");
    <?php
      foreach ($result as $results) {
          echo '<li id="list">' ;?>
            <a href=" *answer should be here I think* "><?php echo $results->member_name; ?></a>
     <?php
            echo '</li>' ;
      } ?>

The topic ‘Data from another DB as Post(Without inserting) or in a CPT array?’ is closed to new replies.