Family Magazine

Tips & Tricks for Customizing a WordPress Theme

By Geoff Griffiths @mmatraining1980

Inspect Element – Dev Tools

The Chrome Inspect Element function is instrimental in making these changes to your WordPress theme.

Let’s say for example, that you want to change the main header on the homepage of your WordPress theme – then right click and choose “Inspect Element”.

Then click on the arrow icon on the top left of the window that opens, and your arrow should automatically select whatever you hover over.



Use a Text Document To Track Changes

Copy and paste code that you want to make changes to.

Make your changes in your notepad document and add a comment so that you can easily identify what you have changed.

Tips & Tricks for Customizing a WordPress Theme


Paste Changes into the Appearance>Customize>Additional CSS window

Once you have selected your code from the text/notepad document, you can go to the WordPress admin section /wp-admin and the Appearance menu and then “Customize”, then near the bottom, you should be able to paste in your new CSS.

Tips & Tricks for Customizing a WordPress Theme



To Preview CSS Changes

In inspect element, click the “+” icon on the top right.

You can then add styles to different elements.

Be aware that you may need to edit the parent element, to see any changes (rather than the specific element)

Tips & Tricks for Customizing a WordPress Theme



To Remove Elements on a Webpage

Tips & Tricks for Customizing a WordPress Theme

In CSS, if you change the “Display:” value to “none”, from inline-block etc.

display: none;

You’ll need to copy & paste the whole block of code from inspect element’s CSS window, into the Custom CSS menu’s window in WordPress’s (Appearance>Customize>Custom CSS)

Tips & Tricks for Customizing a WordPress Theme

The video below has more details on how to do this:




To Change the Colour of Elements

Use the same method as above – i.e. select the element with the inspect element tool.

  • Select the item that you want to choose using the arrow in the Inspect Element window (arrow is on top left)
  • Then change the color using the panel on the right:
Tips & Tricks for Customizing a WordPress Theme
  • Finally, paste the new code for that element, into the Custom CSS window in WordPress (go to Appearance>Customize – wait for the Customize menu to load and then click either “Customize CSS” or “Additional CSS” which is normally located near the bottom left


Change the Colour of Font-Awesome Icons

This is easily done, the same way as shown above.

Select the icon, then change the color in the CSS panel of inspect element on the right.

Select all the CSS in that window and then paste it into the Custom CSS/Additional CSS window on the left:

Tips & Tricks for Customizing a WordPress Theme



Changing the Fonts on Your WordPress Theme

Go to fonts.Google.com to see all the available fonts (well, most of them)

Tips & Tricks for Customizing a WordPress Theme

Open Inspect-Element – click the arrow on the top left of the window

Then, again just select the text that you want to change and this time change the font-family value to the one you want

Tips & Tricks for Customizing a WordPress Theme

Remember to add all the code/CSS from the window precise window that you edit on the right, to the Customize/Additional CSS panel on the left.

Using this method you can also change:

Padding & Margins
Containers
Background Image, Position etc.
Sidebar




!Important

By adding !important to your CSS, you can ovveride all other rules relating to that element. Use this sparingly though as it will get confusing.

Tips & Tricks for Customizing a WordPress Theme

More info on !important here – https://css-tricks.com/when-using-important-is-the-right-choice/


Back to Featured Articles on Logo Paperblog