• First, a newbie to WP & PHP, in making a child theme – help me to understand – if I wanted to insert social icons (only 2 icons) in the header of ALL pages – why wouldn’t I just insert my html code in the header.php for those two icon links as in a normal htm page (assume the link or the icon will not change for years) with the appropriate CSS in MY style.css page vs. adding them through a Plugin? The amount of code added with plugin seems a waste for what little I want to do.
    What are advantages vs the disadvantages of this?? I have done this and get no errors using WAMP – help me understand the WP thought process. I’m using the SoSimple theme 1.16 to learn child themes with WAMP. Does this create a security issue?

    Thank You
    Dee

Viewing 2 replies - 1 through 2 (of 2 total)
  • why wouldn’t I just insert my html code in the header.php for those two icon links as in a normal htm page

    Because any changes you made would be wiped out when the theme was next upgraded. And please don’t suggest “not upgrading” as it is always essential that you keep everything as up to date as possible in WordPress. Or any open source platform for that matter.

    A basic child theme would add very little additional overhead to your site & would protect you against losing customised templates whilst also leaving you free to update the parent theme. It’s also an excellent way to learn about the templating system in WP without having to start from scratch.

    Thread Starter Dee Lete

    (@dee-lete)

    What I mentioned was to a child theme: I realize the child theme changes are saved. my issue or question is “why do it with a “plugin” vs directly at the html into the header.php file? Are plugins just easier for the average person? Are there security issues not to do this? Does this concept conflict with some of WP design issues? Is it a “code” violation to working with WP? Does it need to be “Hooked”? (hooked concept is still new to me). My concern really isn’t the amount of coding, it is the principle or concept of “my thinking” – am I thinking in line with WP/PHP or not?

    Since I am new to WP/PHP, I do not want to waste my time coding to the header.php or footer.php (or any php with html) if is will create a unseen problem for me down the road….

    Hope that clarifies my question a little…

    addendum:
    I re-read the answer again – to clarify – I have added a new header.php to my child theme folder to override the Sosimple folder header.php with MY new code, if that clearer…..

    Thank You

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Child Theme 'Concept' Question’ is closed to new replies.