Jump to content

Help with pulling items from child blog to main site


sffan15

Recommended Posts

So first, I must start off with the fact that I don't like to ask for help. I have learned everything I know about web design by researching and reading. Although I have just begun to work with php, the 20+ hours I have put into this issue have given me ALOT of headache.

 

So I am redesigning my mom's website for her business ( http://tahoeweddingsagogo.com/joey/ ) and I added a wordpress blog ( http://tahoeweddingsagogo.com/blog/ ). The blog is working fine.

 

On the home page, currently located at /joey/index.html I would like to pull categories of posts from the blog, and I would like a specific number of the most recent posts, with a specific character count from the title and body of the post. For example, we have a "Recent Weddings" section on /joey/index.html where I would like to pull the 3 most recent posts from the blog category "weddings." This section, however, is quite small, so all I want of the post is "date -  title" and the first 50 characters of the post.  In another section, I would like the 10 most recent, the title, and the first 200 characters of the post, ect.  You'll see placeholders on the /joey/index.html page where I want these posts to go. So far what I understand is that the file will have to be index.php obviously, and it will have to have what wordpress calls "the loop" in order to work. What I can't figure out is how to pull the info I need, given that it is located in the /blog folder.

 

Am I just missing something completely obvious?

 

I appreciate any help you guys are willing to give me. I have a feeling people will read this post and laugh at me, which is fine. Feel free to let me know if I'm being a total idiot.

 

Thanks,

 

Joey

Link to comment
Share on other sites

I am no WP guru so I am not aware of the inner-workings of WP. But you have a few options:

 

1) Write some code that will pull the data from the database, this is not the best approach as you now have sql credentials stored in 2 places.

 

2) Include the required WP binaries and request the data through the WP API

 

3) Integrate your website in to WP (as a template) write custom modules to match what you want.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.