- This topic has 3 replies, 3 voices, and was last updated 5 years, 10 months ago by Tom.
-
AuthorPosts
-
June 9, 2018 at 1:25 pm #596200Jud
I would like to make a page template that will end up creating a web page that ONLY displays one image.
zero navigation
zero sidebars
zero other widgets
zero footerI have created a child theme, and created a minimal template file consisting only of
<?php /* Template Name: CustomPageT1 */ ?>
but, when I create a page using that template, other page content and settings is/are being inherited, such as theme colors, navigation, footer widgets, etc.
I really want just an image, as from a powerpoint presentation.
How do I do this? Do I somehow prevent execution of code in page.php, or replace those functions somehow with dummy functions?
June 9, 2018 at 3:12 pm #596268LeoStaffCustomer SupportHi there,
Are you wanting that just for one page or the entire site?
We can use filters to turn those things off globally.
Let me know 🙂
June 10, 2018 at 4:56 pm #596895JudI want to make only a subset of the pages on my site behave like this.
I have
– created a child theme as suggested.
– created a template file named “full-page-photo-template.php”, which contains only the one line<?php /* Template Name: CustomPageT1 */ ?>
– created a new page on my website, and selected the template “CustomPageT1”, and “Added Media” to the main content area in the WP admin interface.
When I view the page as a normal visitor, the page is displayed apparently no differently than other pages on the site.
I do not fully understand how WP and GP cooperate to produce the HTML for a web page, but, obviously, more than just the new template page is involved.
I would really like to understand how WP/GP goes about generating a page.
Given that my theme is now a child theme, I suspect that the “page.php” file of the parent theme is involved, and then, from within it, the call to get_header(), and the hook actions
do_action( ‘generate_before_header );
do_action( ‘generate_header’ );
do_action( ‘generate_after_header’ );
do_action( ‘generate_inside_container’ );are involved. I suppose each of the hook actions creates part of the “header” and “menu”, and that other hook actions are called to create widget content and footer content.
Can the new template file be handled by a file other than page.php, which might call different hook actions, like “generate_headerNEW”?
If a different file than “page.php” cannot be called, can another hook be used to modify results?
June 10, 2018 at 10:09 pm #596944TomLead DeveloperLead DeveloperHi there,
If there’s no theme elements (navigation, footer etc..), the theme color options won’t have anything to control.
Are you wanting the page to still have a header? Or are we wanting a page with one image only – nothing else at all?
-
AuthorPosts
- You must be logged in to reply to this topic.