最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How do I apply my CSS to a theme page?

programmeradmin0浏览0评论

I installed the Mog theme for WordPress and I would like to position some of my pictures on a page using HTML divs and CSS. My question is, do I have to create a child theme of the Mog theme in order to do this? Or can I just add my own css to the particular page? If so, how do I incorporate my own css for this particular page? If the Mog theme is updated, how will this update affect my page contents?

I installed the Mog theme for WordPress and I would like to position some of my pictures on a page using HTML divs and CSS. My question is, do I have to create a child theme of the Mog theme in order to do this? Or can I just add my own css to the particular page? If so, how do I incorporate my own css for this particular page? If the Mog theme is updated, how will this update affect my page contents?

Share Improve this question asked Aug 24, 2013 at 23:15 AnthonyAnthony 1357 bronze badges
Add a comment  | 

3 Answers 3

Reset to default 3

If you want to keep your changes while allowing Mog theme to keep updated you will need to create a child theme. This will ensure your changes are kept.

You could also try a plugin like 'Wp Add Custom CSS' https://wordpress/plugins/wp-add-custom-css/). It allows global CSS or CSS per individual page/post. This is saved to the database and will not be affected by parent theme updates. If doing a lot of changes the child theme is the way to go though.

Normally the quickest way is to go to Appearance > Themes > Customise (on your theme).

This allows you to insert custom CSS.

I usually prefer to create a child theme and either override the header.php file by copying it into the child theme in the same folder location.

Or enqueue the stylesheet using functions.php in your child theme.

The child theme avoids any of your changes being overwritten when you update your theme.

发布评论

评论列表(0)

  1. 暂无评论