I have been trying to figure this out now for a while but there but I haven't found any conclusive answer yet. I want to add some pages to wordpress that are static. I need to include JS script that is from a third-party login. Using JS, HTML, CSS. Very simple and basis login.
So normally what I do is create a page, empty, attach a template and put the JS/HTML/CSS/Text into that template.
However, it seems weird to create an empty page in a CMS. Is there another way, a proper way, of adding a normal page into wordpress without using the static PAGES option in the CMS?
You could just create the page and add a link to it from your WP-site. But this is only if you don't need any of the wp-functions. Also it won't show up at all in your wp-admin dashboard.
Related
I'm making a website in WordPress, and I'm using a plugin ACF PRO. I'm doing the entire site with flexible content, so the WordPress site is like a page builder.
Everything is fine, however, I came to a point where I need to have same functionality for single-[custom-post-type], so I can "Add row", header, footer etc... on it, but I can't figure out on how to do it.
I know that it's possible, because e.g if you look at this site here: https://rolleragency.co.uk/our-projects/
You can see that it works. I know they are using flexible content because I worked on that site and I did there what I wanted. I can't remember how to do that.
I think I had to use a Tempate Page? Or? I can't remember.
THe site is built entirely on flexible content, so everything there is modular and it's like a drag and drop, but how do I do that on single-slug?
You have to create a page template, yes.
So something like page-projects.php then in WordPress admin you would have a page called Projects.
The template you created should be automatically applied to this page. If it doesn't for some reason you can choose which template WP should use on the right side when editing a page.
Now, you can add whatever code you need to the page-projects.php. And also any fields you may need for that page you can set up in ACF by telling ACF to apply those fields to pages that use projects template.
This is how I would and did do it on several occasions :)
I'm new to Drupal. I have a page template that has a nav, header and footer. This works correctly for how I want most of my site, except for the login page that I would like to completely customize.
Is there a way to overwrite or ignore the overall site templating (perhaps by placing my login page template into a folder within the /templates directory?) in order to style that one page differently?
Thanks.
If you are looking out for customizing only the login page without its effect on anywhere in the site, you can use page--user--login.tpl.php to override it.
Basically you should find system template you want to override. It may be part of standard drupal installation but also part of some module. Copy it to your theme's templates directory and change the way you like. Clear the cache and drupal will re-scan your theme and start using templates you added instead of original one.
I have a website running Wordpress with a specific, custom theme and I would like to use some of the pages as an iframe within a different website.
The problem I am having is that I don't want to show the menu, header and footer, I want to use a different font and have the page load as quick as possible.
The best way to do this is to apply a different, bare page template to the page I want to embed as an iframe. However this will also affect the page when displayed on the website. There are plugins that will enable the content to be shown as json. This gets close to what I want to do but since it's an iframe I'd prefer to have some basic styling in there.
Is it possible to do the request for the iframe in a way a different page template is applied?
I've tried reading up about this but due to the sheer amount of articles explaining how the page template hierarchy works I've not been able to find anything explaining how to make the client influence this.
tl;dr can I do some sort of ?apply_template='page-bare.php' to enforce a different page template?
I think this might help you: Load post with a different template?
The way is:
Register new query variable
Redirect to a different template, when that query var is set
Create that template in the way you like it
get_template_part might also come in handy here.
So I am trying to do this and I don't know how. I have a wordpress powered website with a plugin called "frontier-post" in it. This plugin makes a new front-end post submission. The way to use it is to put the shortcode "[frontier-post]" in any post in my wordpress page and that page turns into this.
I want to make a custom page for myself, where I can have the content created by this plugin there too. So I do not want it to be a post in my wordpress, but lets say at a corner in the custom page. I have searched and found these but the suggestions there would not work. I am able to include the wordpress so that the custom page has access to posts, etc. but even using this
echo do_shortcode('[frontier-post]');
would not help me. (even if header is included)
These are the similar things i found:
Wordpress/PHP - How to use plugins outside wordpress-powered pages?
Need Help for my Custom Page Template
I would really appreciate it if you could help me with this.
If you are creating a PHP page that isn't going to be rendered inside WordPress, you can't use a Plugin of the WordPress engine to accomplish what you are wanting to build. (As the accepted answer to one of the pages you link to indicates).
Instead, you might be able to use the json-api plugin and have your custom page query it for the data. While it won't render the shortcode, it will give you the raw data to work with.
http://wordpress.org/plugins/json-api/
Edit:
Based on a comment, your do_shortcode should work...just try it without the square brackets.
I know wordpress store the page content inside the database. If I wanna to add content and some programming content into the page, how do I do it? Other than going to wordpress dashboard > page > all pages, is there any way to access the page file so that I can directly write the codes to it?
You can use you webhost's file manager, or your own FTP client to modify the files that wordpress is made of. Though I recommend against this; if you want to do work beyond just editing the appearance, you should design your site from scratch. If appearances are all, search for a tutorial on making wordpress themes, then apply your shiny new theme.
You'll use page.php or page-template.php file under wp-content/themes/yourthemeName/
That way you will change the file template....