Parent – Child Pages and Templating in wordpress

Better way to do it would be to create a single page with a submenu on it. This menu would be created in the template for the custom post type. You’ll have your main menu loading on the site, but when the load your investigator the user will see a second menu (beneath or on the side in widget area) that will allow them to navigate the subpages of that investigator.

I’ve done that several times and it works out well.

Another option (depending on your theme) would be to create a tabbed widget (visual composer anyone?!?) you could take advantage of that would allow users to see different sections on a page but never move away from the actual investigator page itself.

ACF doesn’t create pages for you as separate instances.

IF you were to go down the path of creating individual pages you could create links that would go to

permalink() . “-subpage1” and permalink(). “-subpage2” in page template file, and then assign each of those subpages to the template you created.

based on what you’re doing i would definitely look at this page because you’re going to want more than 1 post type potentially and create relationships with them:
https://www.advancedcustomfields.com/resources/relationship/

pay attention to the reverse relationships on there too.

EDITS for further comment questions.

just to clarify, parent and child are your themes, and then we’ll call the page that shows all your investigators the archive page and individual pages for your investigators will be called the single page.

I don’t actually know the exact name of your post-type, but hopefully you’re using a prefix on your identifier so for our example we’re going to say that your post type is mi_investigator.

After creating a post type wordpress magic will let you see all your investigator posts by going to to www.example.com/investigator (if you are prefixing properly you’ll need a slug re-write in your CPT plugin or else it will be www.example.com/mi_investigator)

WordPress will load them in the same fashion that it loads blog posts archives (archive.php from your theme template)

when you click on any of the posts wordpress loads that investigator content to the single.php template.

Now to customize the output for either the archive or the single pages, there is no need to create an individual page.

You just need to create 2 php files (can be based on the similar files in your parent theme) and put them in your child theme directory. These files will be in your case archive-mi_investigator.php and single-mi_investigator.php (notice that all i did was copy the single.php from my parent theme and place it in my child theme directory, then rename it to single_”name of cpt”.php. Same for archive)

whatever changes you make to these files will be shown when you load ANY investigator page.

2 other points. Before those pages work if the plugin or manner that you created the CPT in doesn’t do a flush on permalinks, you’ll have to manually do it by going to settings/permalinks and clicking save)

3 for the color variations, load a new field in ACF and have the color options there then assign a class to the main div in your single php that has a css bg, font-color, etc associated with it. BAM!

Please mark as answered if this helps! (checkbox) I’d appreciate it!

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)