I'm trying to optimize the code of my site . I wanted to know if it was possible to give automatically a title to a new post without having to do it manually. I have a website of video games. Before posting a review, I first need to create the plug of this game with all the information (publisher, developer, pc configuration etc.).. So I have to put twice the same title. I would only select the plug of the game without having to type the title of the game
To get the title, I am able to retrieve the ID of the plug. Do you think I can write a function?
Code example for get the title of a game :
<?php foreach(get_field('fiche') as $post_object): ?> <? echo get_the_title($post_object->ID); ?><br /> <? echo 'Genre' .get_field('genre', $post_object->ID); ?> <? endforeach; ?>