Any solutions to this?

by kevd10
5 replies
  • WEB DESIGN
  • |
Ok, so slowly but surely im getting there with Wordpress. I have gone through a very good instructional which talked about using chrome dev tools to edit html and CSS. My question is this:

Lets say for example we wanted to add 3 small blocks of text going horizontally across our page. If we did this by editing the HTML in dev tools, where would we then add the altered HTML code in Wordpress? I know that any CSS alterations can just be added straight to the stylesheet of your child theme.

help?
#solutions
  • {{ DiscussionBoard.errors[8783189].message }}
    • Profile picture of the author kevd10
      Originally Posted by PongSet View Post

      So this is on my home page. So index.php would be used, yea? My question is can I add the html directly into the index.php file? If so, how would I know where to add it for correct positioning etc as the index.php file is completely different to the source code seen through dev tools.
      Signature

      Please do not use affiliate links in signatures

      {{ DiscussionBoard.errors[8783231].message }}
  • Profile picture of the author PongSet
    The template file for home page isn't necessarily index.php, it can be anything depends on your WordPress setup & the theme's file structure.

    I might be able to help to pin point the right file to edit if you show me the site URL.
    {{ DiscussionBoard.errors[8783325].message }}
  • Profile picture of the author kevd10
    I dont have one at the moment, im just trying to figure all of this out. I would rather learn myself than have somebody do it for me. I can't see how it would not be the index.php file which needs altering?

    Also, if I am working in a child theme, how do I get the index.php file into the child theme in order to edit it?
    Signature

    Please do not use affiliate links in signatures

    {{ DiscussionBoard.errors[8783394].message }}
  • Profile picture of the author nettiapina
    Do read the Template Hierarchy document. It says right there that index.php doesn't target the home page, but it's the last option if none of the other template files seem to fit the query. Certainly you can have conditional logic in index.php, but there are better options.

    Try to use either home.php if you're trying to modify the page that lists your blog posts, or front-page.php if you're trying to modify the actual front page.
    Signature
    Links in signature will not help your SEO. Not on this site, and not on any other forum.
    Who told me this? An ex Google web spam engineer.

    What's your excuse?
    {{ DiscussionBoard.errors[8783560].message }}

Trending Topics