Press, News, Events
[resolved] Special template files help (5 posts)

  1. edgedesign
    Posted 3 years ago #

    The plug-in works well, but I cannot figure out how to change the header title or get rid of the sidebar that displays regular blog posts.


    Linked directions:

    "In the form of the archive-type-template. In the same way that posts are shown on their own archive with archive.php, custom post types will use archive-{posttype}.php if it's available."

    I have created a template named: archive-press-releases.php with custom header and no sidebar, but plug-in still uses default template.


  2. mattdeclaire
    Plugin Author

    Posted 3 years ago #

    The name of your template needs to match the post type slug, which in this case is singular. So, your file should be named archive-press-releases.php.

    The three post type slugs for this plugin are: press-release, news, event.

    In retrospect, the news slug is confusing. It doesn't make sense to use just new, but I could have used news-item to make is singular. But, I don't want to change it now, as it would wreak havoc on users' existing content. I'd have to come up with a migration strategy.

  3. edgedesign
    Posted 3 years ago #

    Thanks for getting back to me!

    File should be named archive-press-release.php (singular).

    Works great now.

  4. mattdeclaire
    Plugin Author

    Posted 3 years ago #

    Ha. I specifically said it was supposed to be singular, but then I went ahead and gave you a plural url anyway. Glad you caught my error.

  5. edgedesign
    Posted 3 years ago #

    Yes... also revised single-press-releases.php to single-press-release.php. I thought it would be that simple, but didn't dawn on me to make the names singular.

    Perhaps you should include info on template file names under Custom Post Type Archives in the plug-in settings if/when you update the plug-in again. Since the names next to the checkboxes are all plural, I figured the files names should be plural when I moved onto the special template file link you have.

    I really appreciate your help and will recommend your plug-in to others.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Press, News, Events
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic