WordPress.org

Ready to get started?Download WordPress

Forums

SF Pages For Custom Posts
Add template options (11 posts)

  1. J
    Member
    Posted 2 years ago #

    Hi,

    Is there a way to add template options?

    Right now there are several options like Single Post, Page, Archive Page etc'
    I have created a specific page template for my custom posts with specific stylings. how do I make it so I can use that template to display the custom posts on my chosen page?

    Thanks
    J

    http://wordpress.org/extend/plugins/sf-pages-for-custom-posts/

  2. ScreenfeedFr
    Member
    Plugin Author

    Posted 2 years ago #

    Hi.

    If I correctly understand what you're doing, you created a page named "My listing page" for example, and a page template page-my-listing-page.php.
    I created this plugin quite a long time ago, I can't remember if the specific page templates work with the plugin.

    Is this template have to be a page template? If not, with SF Archiver you can use the native "archive page" (I know, you said you already tried this plugin, but please give it another shot):
    - if your custom post type is "product" for example, name your template archive-product.php and enable the "archive capability" for your post type with SF Archiver. That's all :]
    I highly recommend to use SF Archiver since it uses the natural WordPress process, rather than SF Pages For Custom Posts which is "messing" with the main query.

    I hope it will help, give me a feedback.
    Greg

  3. J
    Member
    Posted 2 years ago #

    Hi Greg,

    Thanks for your reply.

    A few things:

    1. I am trying to use SF Pages in conjunction with this plugin: http://wordpress.org/extend/plugins/custom-content-type-manager/
    This plugin creates custom posts types and then I create single-{slug}.php and design it to display those posts in a certain way. I used SF Pages to display it on a specific page but then it doesn't follow the look of the single-{slug}.php I created. So i am trying to find a way in SF Pages settings page to be able to choose from the Template dropdown my single-{slug}.php post template (which is basically a custom post type)

    2. I looked again at SF archiver and for some reason it doesn't seem as simple and strait forward as SF Pages is.... How do I tell it which page to appear on?
    In SF Pages there is a simple dropdown to chose which page to display the custom posts on. There is no such dropdown on SF Archiver, so how do I tell it where to display?

    Thanks

  4. ScreenfeedFr
    Member
    Plugin Author

    Posted 2 years ago #

    Hi again.

    The thing is, you don't have to chose a page to use, because the plugin doesn't need it, that's why the plugin doesn't have the dropdown.
    You don't have to create a page with this plugin.
    Duplicate your template single-{slug}.php and rename the new file as archive-{slug}.php
    By the way, a "single" template is not the best choice for a list of posts ;)

  5. J
    Member
    Posted 2 years ago #

    Ok but I still don't understand how i display the custom posts on a specific page. with a shortcode? how?

  6. ScreenfeedFr
    Member
    Plugin Author

    Posted 2 years ago #

    If you really want to use a page, then ok, SF Archiver is not what you need. I'll take a look to SF Pages if there's an appropriate setting for those specific templates.
    You want to use single-{slug}.php for both the single page and the "listing" page, right?

  7. J
    Member
    Posted 2 years ago #

    Thank you. I really appreciate your help with this.

    Yes I want to use single-{slug}.php for both or one different for each, what ever works easiest. The Idea was to have a list of them and when I click on one it opens it's content.
    (I also thought to add custom code to a Page Template but that seemed more complicated.)

  8. J
    Member
    Posted 2 years ago #

    Any update?

  9. ScreenfeedFr
    Member
    Plugin Author

    Posted 2 years ago #

    Not yet.
    Sorry I haven't much time, I work almost 24/7 these days.
    Moreover, I don't think there's a quick solution for this, a full rewrite of the plugin will certainly be needed. In this case I don't think I'll be able to do so.
    If I have some news I'll keep you informed.

  10. J
    Member
    Posted 2 years ago #

    Well I've found how to add an option:

    Ive added 'is_page' => __("Team Page", SF_PFCP_DOMAIN), to the following code in sf-pfcp-admin.inc.php:

    <?php $templs = array('is_single' => __("Single Post", SF_PFCP_DOMAIN), 'is_page' => __("Page", SF_PFCP_DOMAIN), 'is_page' => __("Team Page", SF_PFCP_DOMAIN), 'is_archive' => __("Archive Page", SF_PFCP_DOMAIN), 'is_category' => __("Category Page", SF_PFCP_DOMAIN), 'is_tag' => __("Tag Page", SF_PFCP_DOMAIN), 'is_tax' => __("Taxonomy Page", SF_PFCP_DOMAIN), 'is_search' => __("Search Page", SF_PFCP_DOMAIN), 'is_home' => __("Home Page (Posts Page)", SF_PFCP_DOMAIN), 'is_attachment' => __("Attachment Page", SF_PFCP_DOMAIN), 'is_post_type_archive' => __("Post Type Archive", SF_PFCP_DOMAIN)); ?>

    but I wasn't sure if to use is_page or is_post_type, and I also am unable to get it to use the write page type I created.

  11. J
    Member
    Posted 2 years ago #

    write=right

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.