• Resolved OWMC

    (@olly-owmc)


    I have a pod called albums. At first I had it as a Custom Post Type. I called my pod items as a list on my home page (using the code at mondaybynoon).

    Using the item name as the slug, I was able to get each item in the list to link to a page displaying the details for that item. I say details, but as a CPT it was actually only the title and main content, not any extra fields. This was because the WP template being used to display the pod item uses the standard wp “the_content();”. That’s as best as I remember it anyway.

    So I remade the pod as an Advanced Content Type to take advantage of Pods Pages and Templates as described on the Openscriptsolution blogpost. I created a field in the pod called permalink. Then I created an “albums” pod page, an “albums/*” pod page, an “album_detail” pod template and an “album_list” template (links to pastebin). I also set the pod Detail Page URL to “albums/{@permalink}” and the Title Field to “Name” (under Advanced Options > Pod Options).

    For the pod pages I have tried using WP page templates on both “albums” and “albums/*”:
    Pages.php
    Pods.php

    For “albums/*“, pages.php fails display the pod details, as should be expected because it uses the worpress php. But if I use pods.php (which uses “pods_content();”), I get this error:

    “Catchable fatal error: Object of class Pods could not be converted to string in /home/oliverwi/public_html/olive-and-oak/wp-content/plugins/pods/components/Pages.php(581) : eval()’d code on line 10”

    Furthermore, for “albums“, pages.php fails to display the pod items, and if I use pods.php, I get nothing also.

    So I was wondering what I’m doing wrong here.

    Also, I was thinking creating an ACT and pod pages and templates seems like a lot of stuff to do, unless you require alot of control over hoe URL’s are displayed. Initially I thought I’d be able to just use CPT and figure a way of displaying it using a WP page template with some amended code to call the extra fields. As CPT items seem to work like WP posts (in the admin area), I thought there should be a way to get them to work like WP pages instead, thus allowing to chose a WP template from the drop down menu when you edit it. Is this possible or something pods could potentially do in the future? It seems to me this would simplify things, at least in my current example.

    http://wordpress.org/extend/plugins/pods/

Viewing 16 replies (of 16 total)
  • Plugin Author Scott Kingsley Clark

    (@sc0ttkclark)

    No problem at all!

    For what it’s worth, all donations are going to a huge cause right now — we’re completely rewriting all of our documentation. The more you can beer us, the more our new doc writer can beer some fancy help text!

Viewing 16 replies (of 16 total)
  • The topic ‘Pods, Permalinks and Page Templates’ is closed to new replies.