WordPress.org

Ready to get started?Download WordPress

Forums

Show specific category posts on a different website (7 posts)

  1. Nazgulled
    Member
    Posted 6 years ago #

    Hi,
    I have my blog set up at http://blog.domain.net and my personal website at http://www.domain.net. The blog is working fine.

    Now, I have a specific category (with ID = 10) that represents news that are displayed on the front page of my website. I want the latest 5 posts of this single category do be displayed on the front page of the website. Which is not using any code from WordPress.

    Basically, I'm reading the DB parameters from the wp-config.php file and pulling the posts from the DB like this:

    $news = mysql_query("SELECT p.post_date_gmt, p.post_content, p.guid, p.comment_count FROM wp_posts AS p INNER JOIN wp_term_relationships AS tr ON p.ID = tr.object_id WHERE tr.term_taxonomy_id = 10 ORDER BY post_date_gmt DESC LIMIT 0,5");
    while ($row = mysql_fetch_array($news)) {
    // CODE
    }

    This is working, the only problem is the post formatting. There are no paragraphs in the post and the smiles are not replaced. These are the only 2 things I've noticed so far, bold text, italic text, images and stuff like that, their HTML is in the post so no problems here. But the paragraphs do not show at all, they are not even saved in the DB.

    Can someone help me fix this?

  2. Nazgulled
    Member
    Posted 6 years ago #

    Anyone? I really need to do this...

  3. whistler2020
    Member
    Posted 6 years ago #

    have you tried using rss?

  4. Nazgulled
    Member
    Posted 6 years ago #

    The problem with RSS is that that I have the global option to show only a bit of the the post and not the full post.

    Is there a way I can specify to use the full post view for a specific rss feed?

  5. rudolf45
    Member
    Posted 6 years ago #

    Maybe the "dual feeds" plugin can help:
    http://www.scratch99.com/wordpress-plugin-dualfeeds/

  6. Nazgulled
    Member
    Posted 6 years ago #

    Yes, it helps, thanks.

    But now I have the problem described here:
    http://wordpress.org/support/topic/113579/

    Which complicates things a bit though...

  7. Nazgulled
    Member
    Posted 6 years ago #

    Well, after some through testing, I can't use the dualfeeds plugin, it doesn't work as I expected and it doesn't fit my needs.

    Is there any other way to do what I want?

    Basically, I just want the paragraphs to be created and the textual smilies replaced by graphical ones.

    There must be some functions I can import from WordPress no?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.