You would need to create a custom theme for your site (or child theme): https://allurewebsolutions.com/wordpress-child-starter-theme
Then inside the theme you would put a custom page template (you can name it whatever you want following the naming conventions of the documentation): https://developer.ww.wp.xz.cn/themes/template-files-section/page-template-files/
Hi, i already know this 🙂 i have made one named post-modal.php in my child theme but its not used for some reason. Also lagacy mode is activated.
Did you assign that page template manually to the pages you want to appear in a modal?
If you don’t assign manually, you have to use the appropriate naming convention for the template to be assigned automatically: https://developer.ww.wp.xz.cn/themes/template-files-section/page-template-files/#page-templates-within-the-template-hierarchy
I see, but its a custom post type. How do i handle that? Because i still get the header and footer and no image.
I have tried with singel-portfolio-post.php and it work but then when i remove the header and footer in this. the regular “post” is without header and footer also. I need to make one separe for the popup only. How do i do that ?
You don’t need to remove the header/footer on the custom template, you just use the modal-ready wrapper: https://allurewebsolutions.com/open-wordpress-post-modal-without-plugin#customize