Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #573941

    Hello,
    I hope you can help me with a couple of questions. I have created a few custom post types and taxonomies while playing with an experimental site and am simply trying to sort out the structure before thinking about anything else.

    I created a custom post type (let’s say it was called ‘bakers’) with a simple plugin.
    I then added a two taxonomies for this cpt called ‘counties’ and ‘area’ via functions.php.
    One contains a list of UK counties, the other a list of postcode areas.
    I created a batch of custom post fields via the ACF plugin, linked to the ‘bakers’ post type.

    I created a renamed single.php in my child theme, called it single-bakers.php and found the relevant code for functions.php so that it shows the correct post title (‘Billy’s Bread’ instead of ‘blog’). That’s fine.

    However, what I also need to do is create customised archive pages to display listings of the above single custom posts.
    One archive page, for example, will be “London” and this should include all listings with this taxonomy. And so on.

    I assume this is output via a standard archive page and so all I have to do is clone and edit one of the standard php files, but am not sure. Which one do I need to customise? Secondly, what code would I need to add to functions in order to get these archive pages to show the correct name?

    Many thanks for any help.

    #574035

    Hi brian7454!

    It is amazing when ppl do get a theme and then customise it so much.
    I am sure you will enjoy working with enfold.

    Take a look here:

    and you will understand more on how to create it.

    Best regards,
    Basilis

    #574062

    Um…all I can see above is an empty grey box?
    However, the link you posted showed up in the notification email. However it doesn’t help at all.
    I’ve found various ‘help’ articles online, none of which have been helpful because what they say to do and change doesn’t relate to what I see in Enfold files… that’s why I was asking for pointers here!

    • This reply was modified 8 years, 10 months ago by brian7454.
    #575060

    Anybody?
    I’ve managed to get single.php customised now, but I can’t find anything with useful help online regarding archive pages (most just say things like ‘find and edit this page…’ without actually saying how…).

    #576885

    Hey!

    Please check the template hierarchy documentation for custom taxonomies and custom post types: https://developer.wordpress.org/themes/basics/template-hierarchy/#custom-taxonomies

    Best regards,
    Ismael

    #576950

    Brilliant, more help from the Enfold help team that is actually no better than saying ‘we can’t be arsed to tell you’.
    Excellent work guys.

    I suppose next you’ll be telling people who ask how to change the colour of a menu that this is customisation, which support doesn’t deal with, and to refer instead to the wordpress codex.

    Waste of space.

    #577050

    Hey!

    I think you’d better off creating the archive pages with the Advanced Layout Builder, that way you’d have full control of the layout and you wouldn’t need to mess with PHP code.

    Once you have these custom archive pages you can use this plugin to create a redirection from the default archive page to the custom one, for example:

    /tag/some-tag -> /my-custom-tag-page
    

    Regards,
    Josue

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.