I am trying to edit a WordPress site. When I try to edit the x.com/blog/ page nothing happens.
I am trying to find out which PHP files are related to set up the blog page, but I do not know how.
If I can find the right files I can edit those. So how can I edit the /blog page in Wordpress?
Open Admin Dashboard and edit page blog page and check which template is currently using for that page.Then go to "/wp-content/themes/[your-theme-name]/" and find that template.
https://developer.wordpress.org/themes/template-files-section/page-template-files/
Alternative you can check if x.com/blog/ is coming from archive page which is custom post type page. You can find it via go to "/wp-content/themes/[your-theme-name]/archive-blog.php"
https://codex.wordpress.org/Post_Type_Templates
Go to /wp-content/themes/[your-theme-name]/. All files which are responsible for rendering the output can be found there.
Most likely index.php, home.php, front-page.php or page.php are responsible. The exact responsibility depends on the structure of the used theme.
Simple drop a
echo "This file is used currently.";
into the top of those themes and check if this appears in the source code if you are reloading the page.
Also make sure that any caching plugins are temporarily deactivated.
The basics on how WordPress themes are made and which template part is called can be found here: https://codex.wordpress.org/Theme_Development
Related
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 using an older version of WordPress 3.5.1.
I know how to use different templates on different pages but the problem is I cant figure out how to set a different template for my blog page. When I open the page Blog in the Edit Mode I see a blank page, contrary to my other pages which display their content. Is it possible that this page is a redirected from somewhere else and how can I figure it out? Also when I change the template from Page Attribute it does not take effect. On any other page it works but this one. How can I figure out how to change the page template?
There's no built in selectable templating system for blog posts. Its based on the actual template files and their hierarchical structure.
http://codex.wordpress.org/Template_Hierarchy
Its probably your index.php or single.php that is throwing an error. I would go into the wp-config.php and find the line that says define('WP_DEBUG', false); and change that to true. Then reload the page and see if it spits out an error. A basic loop is only a few lines of php, so I would guess there's an error somewhere on the page.
As for the pages not changing when you change the template, its possible there is conditional code or something in the template itself. Are you saying it only changes the look of the page on some pages but not others?
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 have recently started working with Wordpress, and I use the HTML Snippets plug-in to fill in the contents of each page. This works well until I hit the blog page. My blog page does not take anything from the page editor, so I can neither paste code snippets nor write anything in the WP page editor field. It only responds to posts. As a result, I am unable to add anything static to my blog page. Also, editing the template post_list file also leads to damaging the template.
How do I go about adding static elements to my blog page?
Essentially it sounds like you're wanting to add a page template to your theme, which you can then assign as your 'Posts' page through the Wordpress admin.
The question itself is rather too broad to answer without an attempt at coding it yourself, but you can read more about it on the codex: http://codex.wordpress.org/Page_Templates#Creating_a_Page_Template
I am building a theme that has a lot of custom templates, like every page. Ridiculous, but for some reason the template I made for the "postings" page is not getting the posts? I have set the post page in reading preferences, and I have set the page to use my template, but it still publishes posts to a default template. Of all the customization I built into this I did not expect the blog part to give me trouble! lol Anyone run into this kind of thing?
Thank you.
The way I usually to it is to have standard setting in reading preferences.
Build my front-page in index.php
Build a template for blog posts
Add a page and assign the blog post template
Of course you then have a kind of placeholder page sitting amongst the other pages, don't really like that. But it works.