template file single-listing.php

I'd like details on creating a template for listings . my understanding is that this should be single-listing.php

i could create this myself and then go through custom fields to get output, but your table display for default is good and I'd prefer to start hacking your display template rather than hacking my theme default single.php template.

there was a thread (somewhere, i cant relocate it, i find this forum very difficult to search) that discussed Directory (or custom press) auto creating a single-listings.php file. I'd like to do that, and avoid complications on the way.

i have a set up on multisite that basically works at present,
http://scottishtransitions.org.uk/members/listings/mrs-smith/

but no single-template.php was created for theme.

I could uninstall directory and custompress and then reinstall making sure directory permissions are set etc. however i want to be sure this does not cause problems (eg old data in database)

- will it cause problems with multisite install?

what is the process for auto creating template?
what's the (step by step please) custompress setup in Network admin before moving to subsite to create custom fields and categories?

would it be simpler to grab the code from single-listing.php in default theme bundled with directory and use this or will there be problems with functions not in my theme?

before i start this , does the next version in beta have a good front end admin screen for adding/editing listings? rather than defaulting to custom posts wp admin ? if it does please give me a copy of beta

thanks

  • Kimberly
    • Champion of Loops

    Hi again!

    This is your best option for what you are explaining you want to do

    would it be simpler to grab the code from single-listing.php in default theme bundled with directory and use this or will there be problems with functions not in my theme?

    The plugin looks for a template called single-listing in your theme, when it cannot find it, it will use the one from the plugin. Moving the template to your theme gives you a way to customize it without losing your changes on a plugin update.

    The Custompress plugin does create a single-postype.php file when you create a custom post type, however it only copies your single page template, so this is not the route you want to go.

    The way we have recoded both Directory and Classifieds is to be Custom Post Types strongly interlinked with CustomPress. So the template files that come with each are much better and customized to each post type way better than what you would get out of the box creating your own in CustomPress.

    Hope this helps to explain a bit.

    before i start this , does the next version in beta have a good front end admin screen for adding/editing listings? rather than defaulting to custom posts wp admin ? if it does please give me a copy of beta

    I'll have to ask the developer to comment on this one. Even we don't get copys of BETA versions until they are ready to be tested. Only the developer has these secrets :slight_smile:

    Best,

    Kimberly

  • Arnold
    • El Macho WP

    Hi @silver_darling

    I'm attaching the current beta here.

    On the single theme idea. Al you need to do is chose the theme that you want to use. Then take the "single.php" in that theme and make a copy of it renamed to "single-listing.php". The make whatever changes you want in the display of that page.

    That's all that the piece in settings does. There's no magic addition of anything to it.

    The plugin tries to adapt to whatever theme you use. It does this by using the page.php template and substituting it's own content in the page if there is no custom template to handle it as above..

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.