I have been using different plugins to style my website (Elementor for example). I want to add a blog but I dont like the default template it haves and if want
it to look like I want I have to style each post separately.
I think that uploading a custom theme may be the answer but I dont want to make a template for all the website elements just one for the blog posts.
Any lead on where to start? I know php, css, html and javascript but I am a rookie to wordpress, I already have access to all the files via ftp.
4
Answers
Basically it’s enough to create a file named
single-post.php
as a template file (you could derive it fromsingle.php
which is in your theme folder) and put it into your theme folder. It will be used automatically to display all single posts.However, be aware that as soon as you update your theme (which usually happens quite often), this file will be lost since the complete theme folder will be overwritten. So either you keep a copy and adapt that after each update (if necessary) and copy it to the new theme folder again, or you create a child theme: You don’t need to create all theme files again for that, only the ones you want to overwrite.
Details about child themes can be found here: https://codex.wordpress.org/Child_Themes
I think a good place to start would be here https://codex.wordpress.org/Theme_Development
Theme Development WordPress Codex.
It’s going to be a whole lot cooler if this is a fresh install and your just wanting some extra features for yourself. Because it will take less work, since you will probably want to create a child theme. Explained further in theme development. But when it comes to making your own template for pages, example, you like them all but the blog roll.
At the top of you page where you build out your page should have this.
Or whatever you like.
Then you can set it up on wordpress in the admin section of pages where it says “Template Pages” inside one of the pages. Choose “My New Blog Roll” because now it would be an option for you.
More on that here. https://developer.wordpress.org/themes/template-files-section/page-template-files/
Here is an example of one I was messing with the other day with bootstrap. Notice the PHP and take out what you need.
Also when looking up anything on the inner webs search for “my problem is this” and put wordpress at the end. Example: “how to get the categories wordpress”
Hope this helps.
For making a different design post page go into the single.php file where we can edit that page and customize .
and another option is that we can create the custom post in our theme and then add the new file in theme ,name should be like this of that new file
single-{custom post type name}.php or single-services.php
for example “services” is our custom post type .
in this pages we can put our template design as single page we want to show on our site and this single page will only show our custom post single post.
You can use Elementor in you Post, create a layout or modify an existing layout as you like.
You can then save that "template", so that you can reload its layout for future use.