php - displaying wordpress post on another site -
i'm trying find best way display posts saved in wordpress on site.
i've found various options far problem i'm getting can't seem find answers on when post displayed, none of formatting kept, example, in main content of post, paragraphs, bullet points , font stylings aren't displayed. if add image post appears left out.
i'm hoping best way php , mysql, looking throught wordpress files i'm unsure how structured. wordpress directory located in same directory of site (e.g mysite/wordpress)
this maybe many other people have asked i'm struggling find correct terminology inorder search answer.
you don't need connect directly blog database. can create new file in wordpress directory , include wp-blog-header.php
file:
example:
<?php require('./wordpress/wp-blog-header.php'); // change fit path ?> <p>recent posts:</p> <ul> while (have_posts()) : the_post(); ?> <li><?php the_title(); ?> </li> <?php endwhile; ?> </ul>
hope helps!
Comments
Post a Comment