A step-by-step tutorial on using custom hooks in PrestaShop 1.7. We used adding a full-width slider as an example, but you can use custom hooks for a broad variety of other purposes.
Here are the lines to be inserted into the mentioned files:
For theme.yml:
displaySlider:
ps_imageslider
For layout-both-columns.tpl:
{if $page.page_name == 'index'}
{hook h='displaySlider'}
{/if}