Creating a plain html home page AMP with WordPress running the other pages - html

Gday
I like to know how you would go about creating a home page in plain html and have WordPress run the other pages?
The reason is I’d like to create a solely plain html website but I need WordPress for my contact page it has a large form on it and I use a plugin to generate it and forms are a bit beyond my knowledge at the moment to create a contact page myself.
(I have tried creating a template page but then WordPress adds unnecessary code [from plugins ] and makes the AMP invalid)

Honestly I'd try and keep it self contained in WordPress itself.
If for some reason you really want a separate HTML/PHP Homepage, follow these steps:
Add a my-homepage.php file to your /wp-content/themes/ACTIVE-THEME directory
Inside that file put the following code:
Add a new page (Pages > Add New)
Give it a recognizable name like "My Homepage"
In the "Template" selector on the right hand side, pick "My HTML Homepage" and click Publish
Go to Settings > Reading, change Your homepage displays to A static page and pick the page you just made
Now you can add your own code as you see fit. Nothing "WordPress" related will get loaded or hooked in since there's no functions on that file - so you're free to code HTML (or PHP) to your heart's content.
You can see a bit more indepth answer over on WPSE: https://wordpress.stackexchange.com/questions/296592/how-to-use-custom-html-file-instead-of-wordpress-homepage

Related

Mediawiki - Create a link to a template's edit page

I'm making a template, in this template I want to include a link that will send me to its own edit page so that it can be easily accessible from the pages it is included in (very similar to Wikipedia's "view - edit - discuss" links), but I want to do it without extensions. Is it possible? how?
I tried using[[{{PAGENAME}}?action=edit]] but it automatically converts that link to {{PAGENAME}}%26action%3Dedit&action=edit&redlink=1. Using html anchors doesn't seem to work either, they are not parsed.

Can I break away from rails asset pipeline?

In my Rails webapp I would like to have a view that only gets its css from a specific css/scss file. I have tried several suggested solutions on here but none to my avail.
However, would I be able to place the example.css.scss file outside of the assets/stylesheets directory and restrict the view file example.html.erb to the example.css.scss styling only for example.html.erb?
From what I understand by reading rails asset pipeline all files in the myapp/app/assets directory inherits its css rules from the application.css file and as well the corresponding css file when the controller is generated creating a view file, css file, etc. etc.
I've created a webapp using Ruby on Rails. The app is almost done and is staged. I had an idea that a landing page would be a nice opener to the webapp.
My goal is to create a landing page for webapp. The landing page consists of a background image with a text centered link, which I would like to link to the home page of the webapp and not receive any styling from the application.css file.
Basically I want this view file to have nothing to do with the application.css file.
Thanks in advance.
While there may be reasons to use a totally different css file that's not part of the asset pipeline (e.g. landing page working while rails is restarting, keeping landing page lightweight, etc.), my guess is that you're more motivated by getting something to work.
I'm assuming you've got styles for most of your app that would conflict with the landing page, so if the styles from app apply also to the landing page, the landing page looks funny, and vice versa. So my guess is that you're looking for a way to have some styles apply to the app, and other styles apply to the landing page.
For this, I would first of all bypass your regular layout - see bypass application.html.erb in Rails app
Then, I would update your regular layout to somehow indicate that it is the app and not the landing page. There are any number of ways to do this, but I might do the following:
application.html.erb:
<body class='app'><!-- etc. -->
landing_page.html.erb:
<body class='landing_page'><!-- etc. -->
Then, in your scss files, update it thus:
application.css.scss:
body.app {
/* All your regular app styles */
}
body.landing_page {
/* All your landing page styles */
}
Of course you can split those into multiple files, etc..
TL;DR
Unless you're running into loading time issues or you have some other reason why you really really don't want app styles loading for the landing page, then just put it all together but scope the styles so that they don't apply when they shouldn't.
You are already working in the Rails domain, so it would probably be easier to continue to stay in that domain.
In my opinion, the best/easiest thing to do would be to create a welcome controller. Create an empty index action in the controller and a view for that action. The view you are creating seems rather simple, so you can just prefix the class/id names (which don't seem like many) with welcome_ and this will differentiate them from your normal class/id names. The link for the homepage text will point to the index action of that particular controller.
Then you can create the root route in your routes.rb file to point to welcome#index.

How to edit WordPress page's html code

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.
Also I added plugin and actived it but can't get the result.
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.
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.
In WordPress 5.5.3, you should be able to click the three dots on the top right, then select Code editor. Alternatively, press Ctrl+Shift+Alt+M.

squarespace query only for home page

I am using squarespace developer kit and going well. I am wanting to integrate some queries to display some very simple data form my blogs that will appear on my home page ONLY.
Not being very fluent in JSON, I am struggling to implement the query on the home page. I have it set up to display the data from the selected blog but it displays the data through each page.
I only want the data to be visible on the home page at the top. Not in the header but inside where all the content is.
Here is my query that works perfectly well
<squarespace:query collection="feature-articles" limit="10">
<li>
{.repeated section items}
<li>{title}</li>
{.end}
</li>
</squarespace:query>
Can the data be inserted into a code block via the content manager so I can then insert into within the content or am I totally wrong in thinking that.
What I will then do is style/ add or edit the UI of the data into either a carousel or whatever is needed for the project.
I just need to know where to store the query so that it fits in with the content.
Appreciate any time.
Review the following link to see how you can edit a template file, to make different pages use different templates.
http://developers.squarespace.com/template-configuration/
Make a completely custom template just for your homepage then paste you code within your custom .region file as outlin ed in the above guide.
Here is the page about working with template pages:
http://developers.squarespace.com/layouts-regions/
Seeing as you know about , I have a feeling you might already know this, so you might want to be a bit more specific about how your displaying your code and I will gladly update my answer.

Index page in Joomla

I have made a homepage in Joomla 2.5, and I need my front page to be different then the page made in Joomla.
My best solution then, is to make the front page in pure HMTL, and then redirect to the site made in Joomla. Is this possible? or is there an easier way to do it? for example with a plugin or something?
Create a custom html page and create it an article and then assign this article to front page. In this way you can display your custom html page to hope page of joomla.
Further if you want to remove even the headers and footers of the joomla page for home page this can be done in various ways
Make module positions and display the header and footer in it an
then in admin do not publish these modules for home page
We have
variable in template index.php which give us flags weather this is
home page you can use this flag and put a condition like if this is
home page dont display the header and footer.
Hope it will help you.
I can't really understand your question. If you want to load HTML only use custom HTML module rendered in your homepage
What are you trying to achieve? Without knowing more, I have two thoughts.
a. Joomla uses index.php. A lot of the time web servers look for index.html first. So if you create an index.html file and upload it to your root folder, it will display that first and not read your Joomla! site. If that doesn't work, check your web server to see the order that it looks for your start page. That is a setting that can be changed. (Depending on your hosting situation)
or b. You can set different templates for a single Joomla! site. you could set a different template for the homepage compared to the rest of the site. (I just need to know more on what you are trying to accomplish)
Have a great one.