WordPress.org

Forums

[resolved] Pulling specific items from posts to pages in a loop (2 posts)

  1. coldmoonrising
    Member
    Posted 3 years ago #

    Hello all. I'm building a wordpress site for a client and they have very specific requirements for the site.

    What I'm stuck on is this: I have a post for a project and said project gets rated by visitors that have worked on the project at home. I currently have a rating plug-in set on the posts and each rating has a specific id so there can be multiple ratings across the entire site.

    On top of this, the client would like a page of all listed projects with an excerpt so people can view and choose from the list of all projects per section of pages.

    What I need help with is trying to figure out a way to either pull the rating id from the post or a way to "tag" the rating in the post and recreate the rating shortcode in the loop. Does anyone have any clues/hints/ideas that could spark my imagination to finish this piece???

    Thanks ahead of time for anyone that can offer up any great ideas.

  2. coldmoonrising
    Member
    Posted 3 years ago #

    So after some thought and understanding that the rating system I'm using allows custom id fields to separate each rated project I did the following:

    1. Used the shortlink option to find the post ID
    2. Set the rating id to the post ID
    3. Eventually found out the what the custom code was to set the post ID to pull the correct rating
    4. Pull the post ID and set it into the code for pulling the same rating ID (since the shortcode was not working in pages)

    I hope this helps anyone else that may have the same issue(s) I did and good luck out there.

Topic Closed

This topic has been closed to new replies.

About this Topic