Tagged: get_header template slider
- This topic has 1 reply, 2 voices, and was last updated 9 years ago by Theme Horse Support Team.
-
AuthorPosts
-
May 5, 2015 at 1:38 pm #24646pavlo.golubParticipant
First of all, please accept my sincere condolences about the disaster happened in your country. I’m absolutely speechless. We are all praying for Nepal.
I wrote a plug-in which allows user download some content. I wish to have ability to show some error message if something is going wrong:
if ($failed_payment) { get_header(); echo '<div class="error"><p>'; _e( 'Some error occurred during payment!', 'pgmysite' ); echo '</p></div>'; get_footer(); }
However get_header() function outputs slider which is set for home page. How can I get rid of this slider and have clean page without any sidebars\elemets\etc.?
Thanks in advance!
May 6, 2015 at 4:42 am #24665Theme Horse Support TeamKeymasterHi pavlo.golub,
Thanks for your condolences and praying for our country.
Yes get_header() will outputs the slider which is set for home page. You need to create a child theme and first unhook the functions and then you need to customize the code. There will be a a bit more code of customization so you need to hire a developer to fix it.
example to unhook :-
unhook functions// Unhook default Thematic functions function unhook_thematic_functions() { // Don't forget the position number if the original function has one remove_action( 'interface_404_content', 'interface_display_404_page_content', 10 ); } add_action('init','unhook_thematic_functions'); // removes the header content by using hook interface_header add_action( 'interface_404_content', 'interface_child_display_404_page_content', 10 ); function interface_child_display_404_page_content() { ?> <div id="content"> <header class="entry-header"> <h1 class="entry-title"><?php _e( 'Error 404-Page NOT Found', 'interface' ); ?></h1> </header> <div class="entry-content clearfix" > <p>Thank you</p> </div><!-- .entry-content --> </div><!-- #content --> <?php }
Thank you!
-
AuthorPosts
- You must be logged in to reply to this topic.