WordPress.org

Forums

Simple Custom Post Type Archives
fatal error (8 posts)

  1. Roy
    Member
    Posted 4 years ago #

    Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home/vhosts/gangleri.nl/httpdocs/wp-content/plugins/simple-custom-post-type-archives/simple-custom-post-type-archives.php on line 108

    The reason for this may be because I also use the "Custom Post Type UI" plugin and Post Type Switcher?

    A question too. I noticed that categories and tags go wrong with a custom post type. Does this plugin solve that too?

    My current situation is as follows: with the first named plugin I created custom post types. I manually created new templates to display these custom post types and I created pages with these templates. This works fine enough for now. Now I for example have a custom post type "quotes" which displays at gangleri.nl/bookreviews/quotes, but when I tag a post with for example "dumezil" to group all the quotes of Georges Dum├ęzil, this tag has the slug gangleri.nl/bookreviews/dumezil, while it should be gangleri.nl/bookreviews/quotes/dumezil.

    http://wordpress.org/extend/plugins/simple-custom-post-type-archives/

  2. Roy
    Member
    Posted 4 years ago #

    The error does not seem to be a conflict with another plugin...

  3. Jake Goldman
    10up Engineer
    Plugin Author

    Posted 4 years ago #

    Roy - I'll investigate the error.

    With regard to the taxonomy permalink, define "should." WordPress is behaving as it's designed, and the plugin doesn't alter that.

    Here's what you're overlooking - what if your custom taxonomy is assigned to multiple post types, say posts and quotes? What should the permalink be? Remember, if you're sharing the taxonomy across multiple types, archives for that taxonomy should show all posts (irrespective of type) in the archive.

    That said, when you register a new taxonomy you have can define the slug with an argument. You could register a quotes taxonomy and define the slug as "quotes/author".

    I may add some native permalinks for logical browsing of taxonomies within post types in a future update. But I'm debating whether that should really be left to a separate plugin.

  4. Roy
    Member
    Posted 4 years ago #

    He Jake, thanks for the reply. I tried to manipulate the "slug", but WP (or the plugin that I use, which is not yours) doesn't allow anything with a / slash. And I do have the taxonomy only assigned to the custom poste type "quotes".

  5. Roy
    Member
    Posted 4 years ago #

    Jake, just for your information, my host still uses PHP4, but claim that PHP 5 will automatically be used if files have the extension .php5, just .php will be handled by PHP4. Could that be the cause of the error?

  6. Anointed
    Member
    Posted 4 years ago #

    @jakemgold

    A few months back I ran into the same issue that you refer to in trying to display the output of a taxonomy term applied to multiple post-types. Needless to say that one is a bugger to figure out.

    I'm curious what approach you would take with this in the following case example:

    taxonomy (actor) term- (Brad Pitt)

    Build a page that outputs the content as follows:

    Actor - Brad Pitt

    movies post-type that 'Brad Pitt' has appeared in
    a
    b
    c

    Television shows post-type that Brad Pitt has appeared in
    a
    b
    c

    etc...

    The route I took was to create separate loops for each post-type on a custom taxonomy-actor.php template file.

    That ended up working out 'decent', but where I ran into issues was in the paging of each post-type. (movies/page-2/) that term-madonna appeared in.

    Another obvious issue is that of pretty permalinks and deciding the best way to output.
    /movies/brad-pitt/movie
    or
    /brad-pitt/movies/movie
    etc...

    This is a standard scenario where I can see many uses of this functionality across many sites. So far not to many people seem to be attempting to apply taxonomy terms across multiple post-types, with separated loops including paging.

    By any chance would you have the time to publish a basic mockup of how best to attack this problem?

    --obviously there would be a lot going on, and it would be a fairly advanced tutorial, but may benefit a lot of users.

  7. Jake Goldman
    10up Engineer
    Plugin Author

    Posted 4 years ago #

    I'm toying with extending the plug-in to create permalinks below the custom post type slug for each taxonomy assigned to the post type, allowing a post type filtered view of the taxonomy (it would use the generic taxonomy templates).

    So for instance, if you create an "actor" taxonomy with slug (actors) for a "movies" post type (with slug "movies") and a "tv shows" post type (slug "tv"), you'd get "movies/actor" and "tv/actor".

    My main hesitation is that I want to keep the plug-in relatively simple and light, and this might be out of scope. It may, however, make a good independent plug-in.

  8. Anointed
    Member
    Posted 4 years ago #

    That would be really nice to see. I gave up on the project after weeks of trying with no working results. It turned out to be much more complicated that I was able to put together. I look forward to seeing what you come up with.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Simple Custom Post Type Archives
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic