Support » Fixing WordPress » Modify footer with css

Viewing 6 replies - 1 through 6 (of 6 total)
  • Add classes to your HTML elements in the footer, and use the existing css for footer as well. Let me know if it resolves

    In my footer.php i already have classes and id for my elements. For the existing css for the footer, do you mean my css file that i created? Or the one wich is created by WordPress?

    my script for my css is in the function.php. I did an enqueue.
    Here’s my code :

    
    <?php
    // Exit if accessed directly
    if ( !defined( 'ABSPATH' ) ) exit;
    
    // BEGIN ENQUEUE PARENT ACTION
    // AUTO GENERATED - Do not modify or remove comment markers above or below:
    
    if ( !function_exists( 'chld_thm_cfg_locale_css' ) ):
        function chld_thm_cfg_locale_css( $uri ){
            if ( empty( $uri ) && is_rtl() && file_exists( get_template_directory() . '/rtl.css' ) )
                $uri = get_template_directory_uri() . '/rtl.css';
            return $uri;
        }
    endif;
    add_filter( 'locale_stylesheet_uri', 'chld_thm_cfg_locale_css' );
    
    if ( !function_exists( 'chld_thm_cfg_parent_css' ) ):
        function chld_thm_cfg_parent_css() {
            wp_enqueue_style( 'chld_thm_cfg_parent', trailingslashit( get_template_directory_uri() ) . 'style.css', array(  ) );
        }
    endif;
    add_action( 'wp_enqueue_scripts', 'chld_thm_cfg_parent_css', 10 );
    
    // END ENQUEUE PARENT ACTION
    
    add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
    function my_theme_enqueue_styles() {
     
        $parent_style = 'parent-style'; 
     
        wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
        wp_enqueue_style( 'child-style',
            get_stylesheet_directory_uri() . '/css/test.css',
            array( $parent_style ),
            wp_get_theme()->get('Version')
        );
    }

    When you are talking about using the existing css, is it on the folder css that i created? Or on the root of the child folder wich WordPress created?

    I’ll get it checked with my Developer and get back with the answer

    Hi @mrcdescollines & @thealanmat ,

    I’m a bit confused why you need to link an external CSS file into the footer area of your page. Adding external CSS via link rel anywhere in your page other than the <head></head> tags is *not* good practice.

    @mrcdescollines ,

    Footers like the screen grab you supplied need to be built with a combination of HTML and CSS. We’d need to see your code to figure out what you’re trying to do and what the real issue is.

    If you need help with this, I suggest sharing the link to the page in question. Otherwise, we will all be wasting your time taking more wild guesses.

    More on that topic.

    https://medium.com/@marklchaves/lifehacking-the-right-way-to-ask-for-help-tech-support-series-part-1-cb4d0da37eb5

    Thanks!

    Hi everyone and thank you for you support.
    Finaly, iv’e been able to solve my problem.
    My css file worked on my footer section of the page. I just tought it didn’t work.
    I did an enqueue on my css in my function.php like mentionned before.
    I did some troubleshooting with someone and i cleared the cache and did a slight modification on an element and everything worked!

    • This reply was modified 13 hours, 40 minutes ago by  mrcdescollines.
Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.