I know a WordPress page is constructed from
The page template assigned to the page,
The style sheet assigned to the page, and
Some HTML.
And I know you can use the Page editor to insert custom HTML. But where does this HTML go? The template is a .php file. The style is a .css file. Is there a file also for the HTML associated with the page? Or is there maybe just a database record that holds the HTML, i.e., the HTML that isn't in the template?
All of your pages, unless they have a custom structure are being served from the page.php file in your themes root. All pages you create via the Page Editor, including the posts are being stored in a table in your database called wp_posts
The schema for wp_posts is as follows:
The information you are editing in the Post / Page editor including html is stored into post_content column in this database table. This includes html, images, hyperlinks, etc.
Go into your sites database and look around, there are a couple of tables which can be seen from the expanded version of this image.
Related
I have a site that was made in WordPress and I need to remake it just with HTML and php.
The problem is
I have a page at the url www.mydomain.com/create
I created a new file with same name, www.mydomain.com/create.php
Now on the host I removed the extension .php, but the problem is i will still hit the word press page.
Where can I find the file with the url set for this page? I don't know much about word press besides where plugins are.
WordPress does not use one file per page / post. WordPress instead has a template system inside themes that defines how pages and lists of posts are turned into HTML. The content of those pages and posts resides within the database and can be viewed in wp-admin. Further, WordPress extensions and themes can define hook functions and filters to modify content and style of the page and execute code upon certain events.
You cannot find a file for this "/create/" page. It has some content in the database but the content itself won't render into what you see in the browser.
Sorry to say this, but if you like to recreate the site, you will have to find a new way of constructing and rendering it (and also reusing code). You might also want to look for a proper framework like Laravel and have some proper routing in place (instead of renaming PHP files).
Edit:
You can change the permalink for create like so:
UPDATE PREFIX_posts SET post_name = 'create_old' WHERE post_name = 'create';
You have to adapt the MySQL table name to the WP posts table by replacing PREFIX with whatever prefix your WP posts table has.
I am a beginner for sitefinity, so sorry for long post, not sure if its already answered, couldn't find out.
As working on sitefinity-8, looking for best option to select separate css while creating page each time.
I know, I can use different theme for different css, which will not work in my case, as we are having long list of css to use in whole site. Also I know, I can add css or any link into the head tag option of page properties or I can add css widget on the page itself to select css for that page only, but our requirement is to select css file while creating the page itself, this will make easy for novice editors too.
Basic thing I tried, to add css script tag into template, made it editable on page. So I can select css, but it exposes server folders, which is not ideal. Wish is there any way so that we can configure to select folder from sitefinity content- Documents & Files. But didn't find out a way to do so.
Other thing I tries, I have created custom field (related media-images, videos, files) for page to select a document & use as a link to add into head tag (to say link to add css for page.) With this custom field I can select needed document from appropriate folder from sitefinity backend itself, not from server. When I am looking into page source, I could see the link tag is there, but href attribute is empty. I also tried with adding related media tag into template the page is using, but the issue is same, no any value in href attribute.
Struggling to resolve this since long time, seeking for expert's advice.Thanks in advance.
The custom field path you've chosen should work - you will need a custom widget on the Page Template that will read the value of the custom field.
The GetRelatedItems extension method of the page node should give you the document object that was selected.
Having the document the widget will have to inject a link in the head of the page with the proper css attributes.
I would like to enter a static one page Html site to Drupal CMS,
But I did not find a clear way for the implementation of the process.
How can I insert my static site on Drupal?
You could create a Basic Page node, including your HTML code as the "Body" field of the node. Make sure you save your "Body" field as full HTML. Otherwise, some HTML tags could not work properly.
With Bustikiller's solution you will be using template of Basic Page content type.
My suggestion is to create new content type, let's call it "test".
Then create a template file for it, name it node--test.tpl.php and place it in:
/sites/all/themes/your-theme-name/templates
(or change template name to fit your content type name)
Clear the cache and your new test content type will start using this new template.
Place your static html into that template file.
Create a node (page) in that template file and when you open it your template file with your static html will be used.
If you want to have it editable instead of editable parts print field values..i.e. body field value...or value(s) of the fields you added to that content type.
That way your page will not share Basic Pace common html, but has it's own. But page and html templates will still be shared.
I am putting together a site in wordpress, and we want to use the gallery for a product section. The problem is, the gallery seems to only point to the attachment file for the image, and I can't seem to change anything (add meta keyword, desc, etc..)
Is there a way to just make the gallery images point to a page? or is there a way to edit the html for the pre-generated "attachment" pages?
The [gallery] shortcode can be manipulated. But if you want a customized attachment page, you just need the template attachment.php in your theme files.
Here's one tutorial about it: How to Create a Custom Single Attachments Template in WordPress.
In this article, we will show you how to use the additional fields in the media uploader and display them in a custom single attachments template.
I need to create an asp.net website which will allow the end users to select a prestored template from available templates, edit header, footer and body contents of the template and create a HTML page that will be stored in a physical folder of website with names like test1.html, test2.html, etc.
Can somebody please suggest me how can I achieve this?
You can you CKEditor or tinymce for same, First of all you can created pre-define template in your project and user can select those pre-define template and modified it in CKEditor and stored on physical location(on drive).
It's might be helpful.