Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Custom Posts in WordPress

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #45203

    Hi, sorry I know this is predominately about css but I know that a lot of you guys are pretty awesome at WordPress so thought I’d give my problem a whirl here.

    I’m building a website for a client and have created him a custom post type so he can create job posts for his business website.

    This, I’ve managed to do, but I’m having trouble displaying it properly. The job listings page works a treat, but I can’t work out how to display the single post once the listing has been clicked. It should be similar to a normal blog post, where you click on the post title and it takes you to the single.php page.

    You can view this site by going to http://insidebized.com/jobs/

    At the moment I get an error screen but the link address seems to be working. Any help would be awesome.

    Cheers

    Alex

    #137053
    Alen
    Participant

    Im on mobile cant expand on my answer other than directing you to http://codex.wordpress.org/Template_Hierarchy#Custom_Post_Types_display

    #137154

    Ok thats clears up a few things, thanks for that. Do you have much experience with custom post types? Could I bend your ear about a few things as It’s my first one and I can’t seem to work out how to get it to display properly?

    #137199
    ChrisP
    Participant

    There may be an issue with how this post type is registered. The archive page is ‘jobs’ but when clicking onto a link, the URL shows `new_jobs` archive for single pages instead.

    #137404
    Eduard
    Member

    So from my experience you can try this. If you have a custom Post type called jobs, then you can create a new file in your theme folder called single-jobs.php and here you can use the code from the single.php file which is in charge to display the single “normal” posts. You can go from there and edit the new file. if you have a file called single-{custom-post-type}.php wordpress will use this file to display the single custom post type. Just replace the {custom-post-type} with the name of your custom post type.

    Also as ChrisP told you already there is a problem since your custom post type is actualy new_jobs, or there are some miss configuration when you are creating the CPT. If this is the first time you are working with CPT I may suggest you to use Advance Custom Fileds plugin and Custom Post Type plugins for wordpress.

    …and don’t forget to read: the [WordPress codex](http://codex.wordpress.org/Post_Types “WordPress Codex”) – all the info is there.

    #137411
    Eduard
    Member

    I did forget to mention that you need to regenerate your permalinks after you create the new custom post type.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘Other’ is closed to new topics and replies.