Issue
Summary: Question 1. How do I import css and html into Wordpress? Question 2. How do I protect it from being erased by a Wordpress theme update? 3. Is there an alternative that allows me to publish my code the way it is without a CMS, and if so what is it?
I built a website layout in my text editor using just HTML and CSS for a client. Her website is under 10 pages. Now I need to import this code into her CMS/website builder, Wordpress. How do I do this while protecting it from being deleted by Wordpress theme updates?
Solution
How to get code in wordpress:
In your theme files, there are the header.php, page.php, single.php, archive.php, footer.php, which are parts of your wordpress site. If you past your code in here, the pages where the theme files are used (for example the header and footer is used everywhere in the frontend in most themes), will include your code.
How to prevent being overwritten:
You can create a child theme of your theme. This way, it uses the files from the parent theme, but if you put a file with the same name in the folder of the activated child theme, it uses this instead of the file of the parent theme. This way your changes will not be overwritten, when there is an update being installed at the parent theme. This may be a good tutorial https://premium.wpmudev.org/blog/how-to-create-wordpress-child-theme/
Publish your code in the internet
You can use a webhost (there are thousends) or a repository. There are also free alternatives. Webhosting should bring you answers.
Answered By - rank Answer Checked By - Marilyn (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.