WordPress.org

Ready to get started?Download WordPress

Forums

Custom Content Type Manager
List children (6 posts)

  1. vakrolme
    Member
    Posted 3 years ago #

    Hi.
    I have Albums and for each album I have a list of child nodes, Tracks.
    I want to list all the Tracks for a particular Album with permalinks and access to Tracks custom fields on my Album page.
    Is it possible?

  2. vakrolme
    Member
    Posted 3 years ago #

    And I'm also interested isn't there a way I could make it work such way that Track is a normal child of an Album?
    Now it's creepy, looks like the plugin regards a parent album for my track as a track, not an album. Permalink to a track directs me to 404: http://www.site/track/album-name/track-name
    Though it should be something like http://www.site/album/album-name/track-name

  3. fireproofsocks
    Member
    Plugin Author

    Posted 3 years ago #

    Yes, WP's handling of URLs is very poor... the plugin isn't regarding your parent "album" as a "track" -- that's just how WP handles this by default. It treats each post individually as a "track" or "post" or "album" or whatever... but WP doesn't support the hierarchy very well, especially when it comes to URLs. The 404s are due to WP's strange way of handling URL requests. I'll have to rewrite that to get it to work with friendly URLs -- this is why I listed that feature as "experimental". I had a feeling WP would mess this up, and it did.

    Much of the stuff I've done with this plugin has required that I rewrite portions of the WP core, which is extremely time consuming. WP is not a very good CMS as this point (in my opinion)... I'm trying to make it better by this plugin, but if you want sensible and flexible URLs, I would recommend that you use MODx Evolution instead. It's not as plug-and-play as WP, but holy smokes, it's so much easier to structure non-blog sites using MODx than it is in WP.

    Many people have confusion on how to structure a WP site, so you are not alone. I would recommend you simply use my other plugin (Summarize Posts) to summarize whatever posts you need on a parent page. It agrees with WP much better.

  4. vakrolme
    Member
    Posted 3 years ago #

    I managed to make the hierarchy work only by disabling permalinks for Tracks.
    Concerning page listing I found out that get_pages() is pretty fine for this - http://codex.wordpress.org/Function_Reference/get_pages
    I think that's what your "Summarize Posts" plugin does.
    Thanks for the plugin.

  5. fireproofsocks
    Member
    Plugin Author

    Posted 3 years ago #

    Glad you got it figured out. get_posts() works for basic scenarios, but it has severe and arbitrary limitations which lead me to develop the Summarize Posts plugin: my plugin gives much more flexibility in specifying search criteria and returning custom fields in the result sets.

  6. vakrolme
    Member
    Posted 3 years ago #

    A follow up:
    I'm trying to list all my albums in a php-shortcode inserted into a simple page. And even if image Output Filter is set as "Image src" this line gives me just an attachment ID instead of URL.
    get_post_meta($this_post->ID, 'cover', true);
    So I have to use get_attachment_uri or something like this.
    I suppose it's a bug.

    Maybe there's another way to show not a single album but all the albums on one page without creating pages, using shortcodes and so on?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic