WordPress.org

Ready to get started?Download WordPress

Forums

Content Types
[resolved] Looping through custom content (3 posts)

  1. Drivetrain
    Member
    Posted 3 years ago #

    I've created a content type called "Asset". In my theme, I've got single-asset.php working fine. I can't quite figure out how to display 10 or 15 Assets on a single page. I've found code examples for a custom loop, but what file would the custom loop be placed into? What URL pattern would I use to view some/all Assets? Thanks!

    http://wordpress.org/extend/plugins/content-types-wordpress-plugin/

  2. Drivetrain
    Member
    Posted 3 years ago #

    What I've come up with is creating a template file named asset-page.php, then creating a blank Page and setting the template for that page to asset-page.php. The URL to view all the Assets is simply the URL for the empty page.

    This gives me what I want, but I'm wondering if this is the "WordPress Way" to handle this? Thanks!

  3. iambriansreed
    Member
    Plugin Author

    Posted 3 years ago #

    I am doing something like that on my site.

    I have a content type called projects and I created a loop of that content type on the projects page template:
    http://scottreeddesign.com/projects

    If you click on a project you see the actual project permalink using the single project template.

    The "WordPress Way" is whatever works. :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic