I want my theme to include files such as:
about.php, contact.php, blabla.php etc.
And I want those pages to be editible through the wordpress admin interface, how should I proceed to do this?(I want the pages to exist as soon as my theme is selected, so to say I want a already predefined number of pages that is customizable).
I mean there is no problem just making links to these pages and make them use the wordpress header and footer but how can I make the content of them editible like a 'page' in the wordpress adminpanel?
Thanks in advance.
You can user Custom page template for more information regarding custom page template .. http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates
Related
Even with a woosidebars plugin, my sidebar doesn't show on the shop page. I think it may be due to the free plan theme limitations, however on the pro theme description it doesn't mention an added feature. Could anybody help? Thank you!
You must check your shop page template, usually it is placed in the folder /woocommerce of the theme. Sidebar must been there, find it by id.
Also you can to rewrite Woocommerce templates and add the sidebars here: just create the new directory named Woocommerce in your theme and add your customized templates here. In this case, you need to name the template files exactly as they are called in the plugin, you can see it here
i want to convert my html website to the wordpress. But can you please talk me that how i can convert and connect the other pages with the main page???
I'm going to start from the point of view you already have Wordpress and are ready to start.
You can't take your existing HTML website and just add it to WP.
What you need to do is to build your own custom theme, that matches your current HTML files, using the already existing WP templates and files.
Best way is to duplicate an existing theme to play/manipulate so that you don't break WP. The last thing you want to do, having no experience, is to mess with and break the default theme and be unable to get it back again without a full re-install.
RE 'connect the other pages with the main page' WP allows you to have static pages and set them as your home page and/or anywhere else you want. With these pages you can also set up different templates within your theme if you need to.
Wordpress have all this help available here:
Wordpress creating static pages and custom templates
Its not really that simple. You should read about WP theming. Here's the start:
https://codex.wordpress.org/Theme_Development
Check codes from other themes to see how to output basics. Theming has a lot of parts, but to ouput custom html you will need these files:
style.css
functions.php
index.php
single.php
With those you should have an basic blog output with core WP functionality.
I am a real newbie with wordpress. I need to quickly find out the filename for a particular url.
Let's say my URL is
http://example.co.uk/account/membership-levels/
Where will the .php or .html file most likely be? In themes folder?
w
Thanks for your help.
Wordpress doesn't have a 1:1 relation between content and templates. On some minimalist themes you could have a single php template in your themes folder (wp-content/themes/themename/single.php) to display all your articles.
Depending on your permalink structure, that link you are asking about is probably rendered using the page.php template, and if it isn't, then single.php should be the one. The only reason for editing a template is when you need to change the structure of all your posts. If you only need to edit one particular post or page, then you should just edit the content.
To edit the content, you need to log into your dashboard (wp-admin) and look for that entry among the pages or posts section.
Many themes will show an edit icon next to the posts title if you read it while logged on your dashboard, so you can skip searching for it in the backend.
I'm trying to create WP site with different templates with different functionality but in same web page with same header and footer.
So my question is, Is Page Hierarchy (page-about.php) different than Template Hierarchy?
If its different thing, can i use both of them in same page?
Ex: templates/about.php + pages/about.php = about page with about template etc...
The template hierarchy boils down to how WordPress decides which template to load when a URL is requested (when you type a URL in your browser address bar). In your question above, you mention page-about.php - this is one of the many templates you might have in your theme folder. When someone requests the page example.com/about on your website, WordPress will load the page-about.php template because it is the best match according to the rules in template hierarchy.
For info on exactly how the template hierarchy 'matches' URLs to templates, see:
https://codex.wordpress.org/Template_Hierarchy
Long short of it is this: if you go to mysite.com/blog, you see the blog landing page, which uses the index.php template in my theme. However, I want to be able to go to mysite.com/blog-content and get all the same content, but using my page-blog-content.php template in my theme.
How can this be done?
Thanks in advance!
* EDIT *
To clarify, I'm trying to have two different URLs, /blog and /blog-content load the same content; specifically, the blog landing page. The only difference between those two URLs should be the template they use. I have two templates in my theme ready to go, I just need to make /blog-content mirror /blog and direct it to use my page-blog-content.php template.
There's heaps of options available, but (I think?) your question is too broad to answer specifically.
In general, you can select a specific template for a given page/post (from within the page/post edit screen).
Otherwise, you can create a specific template that is selected, based on its filename, for a certain slug, category, etc...
Refer here: Wordpress Codex -> Template Hierarchy
Hope this helps!
You could use the theme switching feature/plugins of wordpress. It works with URL's