badget

Biggest Sale! Special Offer!

Get 30% discount on all of our single themes with this coupon code: #30%SALE

Hurry up! *Limited time offer*

child theme: 404 page and search page styling

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #17887
    iacwebsites
    Participant

    I have a couple issues:

    1) I have not been successful in loading a child theme to the site. It removes all of our styling and navigation menus. Any ideas?

    2) I would really like to change the style of both the 404 page and the search results page. What are my options?
    As I am not able to use the child theme to upload an edited PHP file for the 404 page and search results page, is there a possibility of using custom css: is it possible to style the 404 page and the search results page?

    Thanks in advance for your help!
    Mary

    #17943

    hi iacwebsites,
    add the following code inside child theme functions.php file

    unhook functions
    
    // Unhook default Thematic functions
    function unhook_thematic_functions() {
        // Don't forget the position number if the original function has one
    
    remove_action( 'attitude_404_content', 'attitude_display_404_page_content', 10 );
    
    }
    add_action('init','unhook_thematic_functions'); // removes the header content by using hook 
    
    attitude_header
    
    add_action( 'attitude_404_content', 'attitude_child_display_404_page_content', 10 );
    /**
     * function to show the footer info, copyright information
     */
     
     
    function attitude_child_display_404_page_content() {      ?>   
    <div id="content">
    		<header class="entry-header">
    			<h1 class="entry-title"><?php _e( 'Error 404-Page NOT Found', 
    
    'attitude' ); ?></a></h1>
    		</header>
    		<div class="entry-content clearfix" >
    			<p>Thank you</p> 
    		</div><!-- .entry-content -->
    	</div><!-- #content -->
      <?php 
    }
    
    

    This will display thank you so you use your text inside thank you

    Thank you!

    #21003
    iacwebsites
    Participant

    Hi,

    Finally getting back to work on this site. When I copied the code you provided just below the last line of the child theme functions.php file (see child theme functions.php code below)–it broke the site. Any advice would be most appreciated (I am using a child theme plugin). Also, what is controlling the bright green, large type, all-caps title in the breadcrumb area on the theme’s 404 page (PAGE NOT FOUND) and search results (SEARCH RESULTS) pages:
    Examples
    http://www.immunizationcoalitions.org/x
    http://www.immunizationcoalitions.org/?s=help

    Thanks in advance for your help!

    ********
    <?php
    // Exit if accessed directly
    if ( !defined( ‘ABSPATH’ ) ) exit;

    // BEGIN ENQUEUE PARENT ACTION

    if ( !function_exists( ‘chld_thm_cfg_parent_css’ ) ):
    function chld_thm_cfg_parent_css() {
    wp_enqueue_style( ‘chld_thm_cfg_parent’, get_template_directory_uri() . ‘/style.css’ );
    }
    endif;
    add_action( ‘wp_enqueue_scripts’, ‘chld_thm_cfg_parent_css’ );

    // END ENQUEUE PARENT ACTION

    ********

    #21022

    Hi iacwebsites,
    Just add this code inside styles.css too in your child theme

    /*
    Theme Name: attitude Child Theme
    Author: Self-Help WordPress User
    Template: attitude
    */
    
    @import url("../attitude/style.css");

    and add this code inside functions.php and see whether it works or not

    unhook functions
    
    // Unhook default Thematic functions
    function unhook_thematic_functions() {
        // Don't forget the position number if the original function has one
    
    remove_action( 'attitude_404_content', 'attitude_display_404_page_content', 10 );
    
    }
    add_action('init','unhook_thematic_functions'); // removes the header content by using hook 
    
    attitude_header
    
    add_action( 'attitude_404_content', 'attitude_child_display_404_page_content', 10 );
    /**
     * function to show the footer info, copyright information
     */
     
     
    function attitude_child_display_404_page_content() {      ?>   
    <div id="content">
    		<header class="entry-header">
    			<h1 class="entry-title"><?php _e( 'Error 404-Page NOT Found', 
    
    'attitude' ); ?></a></h1>
    		</header>
    		<div class="entry-content clearfix" >
    			<p>Thank you</p> 
    		</div><!-- .entry-content -->
    	</div><!-- #content -->
      <?php 
    }

    Thank you!

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.