How to add code into wordpress site? [closed] - html

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 8 years ago.
Improve this question
Hello I have just started to use word press today, I have developed my own theme, and edited the header and footer files to show what I want it to show, however I’ve ran into a problem adding in the main content. What I did was just take the html, and dump it into the html editor and this worked great site was fine, however if you click into the visual editor and then click at the start of a div, and press “backspace” it removes the div and merges it with the div above it, should this happen? And if that is what is supposed to happen can you prevent it?.
Allot of my potential clients don’t want a html website and want word press and that makes me lose them since I am mainly html/css/php etc, so that’s why I'm learning it, however if the above is what happens it seems like these clients will keep on coming back to me wanting it fixed etc and make me look bad for making sites that break easily thus decreasing my value as a freelancer.
Any and all help is welcome the reason I'm asking is because i can’t find any websites about this they are all purely make a theme. Thank you.
P.S this site is running locally so cannot provide link sorry.

I agree with #jhanifen, your client will not want to post html into the WYSIWYG editor, so keep in mind your theme will have to allow what ever they choose to put in there.
You wont be able to prevent the behaviour you are describing, you could lock the page from other users editing it but this is a bad way to go.
I usually make a child theme of a good simple standard theme and create page templates to allow for different page styling. http://codex.wordpress.org/Page_Templates
You may also want to look into custom post formats for more specific posting behaviour. http://webdesignledger.com/tips/getting-started-with-wordpress-post-formats.

Related

Simple website (HTML & CSS) - what is the best way to simplify subpages editing? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed last month.
Improve this question
I'm trying to get back into HTML & CSS coding and learn JS. I found so many tutorials which are very helpful, now I would like to develop some simple websites. Many years ago the only way to make subpages (I hope it is a correct translation) was to use iframe or just copy whole content from homepage (so with need of editing every page to change ex. logo or footer). What is the best way to do it now?
Typing "HTML CSS webpage tutorial" in YT returns a lot of awesome results, but it gives me only the solution how to make a design, not a website with working menu etc.
What do you suggest? I prefer to work on separate files instead keeping all code in one "index.html".
Thank you in advance,
Happy New Year!!!
Regards, Mariusz
I have no solution yet.
Nowadays different frameworks are used for that purpose. If you don't want to use one, the easiest way would be to still use PHP and use its include method to load "subfiles" like header, footer, navigation sidebar and other content / website parts that are identical on all pages.
BTW, just a note aboute a detail in your question: The "ancient" method for this didn't use iframes, but frames – that's a big difference: iframes load external webpages, frames (as parts of framesets) load parts of the own website.

How can I create standard layout for multiple pages? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
Currently, I am working on my first web page using HTML and CSS. I want to use the same layout like background and header etc but I can't find a way. Today I found a couple of website telling about the template. Is this the related to what I want to do.
Thank you for helping a beginner.
Sam
I would recommend you a few things:
Find websites that make you feel as it is what you wanted to build.
Check their source code and try to find the semantics they have maintained.
Once you figured it out, you should try to create similar one.
You should follow HTML5 specifications , as it will help you build solid foundation. while doing this you will also understand best practices.
HTML or designing mostly depends on requirements. so you might not get one rule to follow, just invest time understanding some great works out there and practice alot.
In case you are very concern to layout, search for website layout images and you will get plenty of images having typical elements like header, navigation/menu, body (left/right sub menu + main content), footer.
You can consider templates for learning but it may lead you to trap of copying-pasting.
You can use Microsoft Expression Web application, which handles template. You make one page and save it as template and declare editable parts for sites. Then You can create multiple empty HTML pages. Finally you attach template, then it works.
Or if you can use PHP, you can create different parts of your Web Site, like: header.php, footer.php, banner.php and include them in every page where modifying the body and not writing the same footer, header, banner

Hide some element from printing by client side on web [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
Let's say I log into facebook but I don't want the "likes" to appear when the page is rendering.
Again: I open a photo from my friend. Under the pic there's a element that says "Somefriend, someotherfriend and 123123 persons like this".
I don't want that to appear.
I think it can be achieved by writing some script (plugin, addon) for my browser, maybe in Firefox with firebug or in Chrome with it's built in code inspector...
Any suggestions?
Cheers
Yes, you can easily implement such functionality using browsers' extensions (add-ons). In order to do so, read their official tutorials. We can't give you exact solution because it differs among browsers. One thing will be similar though - they all use Javascript for page manipulation
Every browser comes with a built-in CSS style sheet. Simply goto the Developer Tools or press Ctrl-Shift-I on most browsers and check out the user agent stylesheet. The trick is to find this stylesheet in your installation folder and add whatever elements you want to hide and adding !important so it overrides everything.

keep header remain when navigating to different links of website [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
How do we keep the header remain there even when navigating to different links within a site?
ex flipkart.com, eemli.com - when you click the header links, the header gives a feeling that it remains but the page and URL changes. I understand if the header has dynammic ever-changing contents, this cannot be achieved.
Here is a good article showing some tecniques to achieve that...
How can I change the page URL without refreshing the page?
Every page sends the same header, either through a templating system (JSP, Velocity, Freemarker, etc) or because it's hardcoded that way. Each new page just renders the same HTML at the top of the page.
Well, you could do one of two things.
Use a frame to load your content (very old web technique), or
Load in the content of the next page with AJAX and replace what's underneath the header.
Of the two, #1 is more foolproof but #2 has a slicker feeling. That being said, I can't imagine using techniques like this are good for SEO.

HTML page editing [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 8 years ago.
Improve this question
In an attempt to learn HTML, I thought it may be a good idea to edit some simple code. So, I navigated to what I figured was a simple layout on a website and copied the source to my desktop. I made minor changes and attempted then to reopen the HTML file in a browser to see the changes.
Instead of the same layout with a few minor adjustments, the entire scheme was deformed. The wording was all there(no longer formatted), but the background was now white and all the links appeared structrually in one column on the left side of the screen.
So, in essense, what is the best way to learn HTML and why didn't my attempt at editing work? Are there more files required than provded by a simple source save provides?
The HTML likely references things by RELATIVE PATH, e.g. a CSS File included with /styles/... not http://originaldomain.com/styles/... So if you just saved the HTML, none of the relative paths will resolve. Most browsers allow you to file --> save page as, which will copy not just the file but also the resources.
Try www.w3schools.com/html/ should give you a good start and a good understanding. Don't try and run before you can walk! And try learning CSS aswell
The file you needed was an external CSS file. It is linked to in the head of the document. This site is better than w3schools, www.w3fools.com
There are a lot of videos out there. Try www.reddit.com/r/learnprogramming
That community is much laid back and friendly!