Create custom theme from scratch in wordpress without using default - php

I am developing a custom theme from scratch in WordPress, So i have few questions about it.
1) Is custom theme create using default theme.
For example ( Suppose i have copied twentyseventeen and paste it and rename it my_custom_theme then after changes as per HTML in particular files (header,footer etc)
2) Should i create necessary files for theme like (header, footer, index, style, page, function etc)
So i want to clarify which way should i go for create a custom theme 1st or 2nd.
Someone please help me for this

I would recommend using underscores
It is a starter theme foundation setup built for that purpose, it has all the needed files templates and uses the best practices and organised code.
You will take it and build your theme from it.
There is also understrap which is underscores with bootstrap styling
this will save you alot of setup and preparation time, you can delete and remove any code or any template you not using.

Related

How to create a child theme for LMS (with framework directory)

What is the right way to create a child theme for LMS theme (http://wedesignthemes.com/themes/lms/)? One of the problems with which I faced is that use own framework. And I don't know correct solution for this
As a solution is an override in child function.php path to the directory, but on an update, it can be an issue because new changes/functional will not be work as should.
Why are you using a framework along with a premium template?
Just use one or the other, and use the simple child theme generator at GPP if you don't know how to create a child theme:
https://graphpaperpress.com/wordpress-child-theme-generator/
Under parent theme select 'I don't see my theme here' and in the box that pops up just type in "lms" (without the quotation marks).
Upload the child theme zip you've created, activate it, and you're good to go. It's important to note that you'll possibly lose the changes you've already made to LMS using the customizer.
If I'm not understanding your question please explain why you require your own custom framework. I don't understand why you'd pay for a premium template, then couple it with your own framework. It's already built on a responsive framework...

how to find snippets when building a new WordPress theme?

I had gone through the current default theme (twentytwelve maybe) and looked through the code to find the core functions that make the theme work in files like index, page, single etc.
Is there a more efficient/cleaner way to find the snippets for each major theme file when starting to make a new theme? If not, how do you all do it? Do you do what I did and then reuse that template ?

Questions regarding wordpress

I am a developer who has never used wordPress before and just had a couple of questions about creating a custom theme
To create a specific look to a website do I create a static design then inter grate it with wordpress and add the dynamic content where it needs to be added?
If you create a custom theme how do you make it dynamic rather then being static? When I switch themes I loose the all the appearance menu options such as (menu, widget, header and background) How do i create them?
For stuff like image carousels if I want the images to be dynamic do I create a widget for it in the functions.php file?
For all the text on the page do I just spit that out thru the visual editor? seems to break links when editing
What are starter themes?
Sorry I am quite new to Wordpress but have knowledge in html, css, js and php but I just struggle to understand how to integrate a custom design and make it all dynamic
As a first step to create a basic new template I would recommend you starting with one of the default WP themes (e.g. Twenty Fifteen), leave all the core files (they contain dynamic parts e.g. functions loading header/footer/content) and just customize the css files and images. Further customization would require changing code in php files (e.g. header.php for the header, index.php for the homepage, single.php for the article page, etc.)
It is true that some options related to header, background, etc. can be theme dependant, so when you change it the configuration gets lost, but the others like menus and widgets remain like they are when switching themes.
Yes, for stuff like carousels you usually have to use custom widgets and plugins, you can find some really good ones on the web (e.g. this one), so you just upload the images and apply configuration in the backend.
Yes you use the WordPress editor (as you see it has Visual and HTML view) for all the user content within the pages and posts. Broken links might be cause of using relative paths, just make sure they are complete.
As mentioned in the first point you can always start with the default WordPress themes like Twenty Thirteen, Twenty Fourteeen, Twenty Fifteen etc.

How to create a custom drupal cms from starting

Actually i need to know how and where the page content for each drupal page comes. So i tried to integrate my own custom theme to drupal. In the tutorial they are saying like i need to create a custom folder and copy one of the default theme like garland/pushbutton to that folder. I got it correctly, but when i check the files and functions in these template the functions used to create the template are different. For example in pusbutton theme we don't have template.php but in garland we must have a template.php file to show the content. So i am getting confused, is drupal don't have standered way of or functions or files to create a custom templete? Also how the data comes in each page?
It is a good practice to copy the existing core theme folder and put inside /sites/all/themes.
Each theme in drupal is different from the other. For instance the template.php is used
For all the conditional logic and data processing of the output, there is the template.php file. It is not required, but to keep the .tpl.php files tidy it can be used to hold preprocessors for generating variables before they are merged with the markup inside .tpl.php files.
The only required file involved in creating a theme is .info file.
Learn more about How theme works

Retrieving names of over-ridden theme hooks in views 2 (Drupal 6)

I have a created a view (lets call it my_view).
In the theme: information section if the view I have noted one of the suggested template names (views-view--my-view--default.tpl.php (or close to that)), and created my own template file with that name.
This all works fine and when I visit the theme registry, I can see there is a hook there with the name of the template (views-view--my-view--default). However this hook has a type field of 'engine' rather than 'module'. I assume this is to do view the way views works out its own theming?
I want to implement hook_registry_alter to modify this theme hook (and others created in the same way), but I cant work out how to retrieve a list of these hooks.
I tried using array_keys(views_theme()) to get all the views hooks back but this list doesn't contain hooks created by over-riding template files. It only contains the default hooks like views_views_field etc
Is there a way to bring back a list of views theme hooks over-ridden in this way?
I answer here as your last comment seems to indicate you are not interested anymore in pursuing your initial approach, and 600 chars would not be enough, anyhow.
An alternative approach to achieve what you want could be to use the "inheritance" of sub-themes from their parent theme. You could in other words define your user theme as a sub-theme of the admin theme.
In this way the theming engine would search for templates - in the case of a user viewing the site through the user theme - first in the user theme folder, then in the admin theme folder, and then in the module directory.
This is for example the same mechanism used by zen for letting you create your themes with the starter kit.
Hope this helps!

Categories