• Hi

    I’m new to WordPress and I wonder what would be the easiest way to get a single database entry (like a number out of a table) into an article.
    I don’t want you to do all the work, I’d just like to know if there is a plugin or what I should be searching for as I could not find any, or if I’d have to manipulate the template, or enter a bunch of code seperately for every article…whatever.

    I would just like to know what would be the easiest way to get a single entry out of the database into the article.

    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Exactly what are you trying to get into the article? What data? What table?

    Thread Starter kampfflummi

    (@kampfflummi)

    I have a forum installed into the same database as wordpress. I would like that forum to handle the articles comments instead of a normal commenting system. All I need is a link to the thread that belongs to the article. The link should say something like “5 comments in forum”. Hence, I need the 5 to be pulled out of the Database.

    Since I don’t really know the correct words I hope this explains what I need.

    Sounds like you need more than just a number from a database. At the very least you need a number and a link. But sticking to your question, there might be a plugin that integrates your forum and WP but it looks like you’ve tried and failed to find one.

    You will need to edit your template to remove items connected to WP’s comment system and to add the links to the forum threads. To pull off the latter you are going to have to write a SQL query that will grab the data for you. You can do that in the template file itself or hook a function into the post_* filters and thereby get the data included in the main wp_query.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to get a database entry into an article’ is closed to new replies.