• I was asked to add a blog to an existing WordPress installation. The problem is the “posts” category has been renamed, customized, and functions entirely different from the default set-up. The previous developer set up the website nicely, but I am not sure if adding a blog to their existing site is possible. They seemed to use the “Advanced Custom Fields” plug-in as well as custom functions in the back-end to give the posts area new functionality. If I go to edit a post (which is now called a resource), I don’t get a text field where the content usually goes and see new areas for uploading material.

    Website for reference: https://www.sani-care.com
    The individual materials under the dealers section is currently what is set-up as “posts”.

    My question is how can I add a blog if the default posts section has been modified to such an extent? Is there anyway to duplicate the “posts” section of WordPress?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    The dealer materials are all single files per “post”? To free up “post” post types they could be all converted to attachments, but then the queries, templates, or pages or whatever they are need to be altered to return attachments instead of posts.

    Or leave them be and create a new post type, like “blog” or something. Assign it all the same support options and taxonomies as the default post, and create archive-blog.php and single-blog.php templates based on the original templates for post that shipped with the base theme. I’ve probably missed some details, but that should essentially restore blogging capability.

    Ideally, while working on a duplicate copy of the site in case this breaks things, I would: and and then:

    1. create a new custom post type called “Resources”
    2. update any relevant queries/templates/etc in the theme to use this post type
    3. change ACF’s settings so that the custom fields show upon “Resources” as well as “Posts”
    4. duplicate the custom functions so that they apply to “Resources”
    5. use post Type Converter to change all the current “posts” into “Resources”
    6. remove the custom functions that apply to “Posts”, leaving them only on “Resources”
    7. change ACF’s settings so that the custom fields now appear only on “Resources” and not on “Posts.”

    Failing this, I would do as bcworkz has suggested and set up a defacto blogging function using custom post types, as that would certainly be easier and wouldn’t require you to mess with the other developer’s customisations.

    Thread Starter melissasms

    (@melissasms)

    I didn’t want to mess with what was already on the site, so I followed bcworkz’s suggestion. A plug-in called “Types” worked perfectly for creating a new custom post type. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom Post Types’ is closed to new replies.