Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to edit WordPress page's html code

Tags:

html

wordpress

I can't get editable html code behind the page. I want to make some changes to the page. Web site is hosted in the remote server. Someone assigned this task. There is empty editor when open edit page as below image.

enter image description here

Also I added plugin and actived it but can't get the result.

like image 920
cmit Avatar asked Feb 05 '15 07:02

cmit


People also ask

Can you edit the HTML code in WordPress?

To get more control on how your WordPress site looks and functions, you can edit your WordPress code to customize different areas: The new block editor and the classic editor allow your to edit HTML code for individual posts or pages. If you want to edit your WordPress theme's source code, use a child theme.

How do you edit HTML code?

By right-clicking on the HTML in the “Elements” tab and selecting “Edit as HTML,” you can make live edits to the markup of a webpage that Chrome will immediately render once you're done editing.

How do I edit the HTML head in WordPress?

To find the file and edit it yourself go to wp-content > themes > your-theme-name > header. php. You can then open it in a code editor and make any changes you need to.


2 Answers

The picture you posted is of the WYSIWYG editor, which is only for adding content to the page.

If you want to edit the layout of the page itself you have 2 options -

Minor page edits to appear across all pages on the site - Go to Appearance -> editor -> page.php and then edit the code to suite your needs.

Large page edits to appear on one or two pages -

  • Get access to the files
  • Duplicate page.php with a different name
  • Edit code

When you go to add a new page you should have an option to pick a page template. Choose the page template you just created.

like image 68
Phil Nind Avatar answered Sep 19 '22 16:09

Phil Nind


If you know exactly what you are doing, you can use Chrome "Inspect" feature, and change the HTML of the content inside the WordPress WYSIWYG Editor. After injecting your HTML, click Preview or Publish and your changes will be saved correctly.

like image 26
user1032613 Avatar answered Sep 18 '22 16:09

user1032613