Auto-generated page file - wordpress

Created a page
The address bar says digitalelectronics.ru/elementor-7/. But there is no such folder in the site. Tell me which file contains the template of the file displayed in the browser under the address digitalelectronics.ru/elementor-7. Looked at a temporary file (needed, searched)
Then I searched for the file by the text found in the chrome code (see immediately above) -
but found nothing
Tell me how to find the Elementor file displayed in the website builder?

What you are seeing is not a folder, it is the permalink of the post/page. Wordpress rewrites the url path based on your settings:
You can change that slug when you edit a post/page.
Classic Editor:
Gutenberg Editor:
See here for more info about permalinks.
To find out what php template is responsible for the page you are viewing have a look at the template hierarchy. It would usually be single.php if it is a post or page.php if it is a page.
Alternatively you can use a plugin like this one, or similar, that would always show what templates make up the page you are currently viewing.

Related

can't find Single Product Woocommerce template missing

i am trying to edit the single-product template of my website but this file seems to be lost or hidden as i show you below:
As you can see on folder's root there are no such file neither in the other folders. So i found a plugin that tells me what template is the current page using (What The File) , so i go to my single product page and check and voila:
You see that there's a template called: taxonomy-product-cat.php but it's nowhere!
I have set my settings to show all hidden files but still i can find this template.
Can someone help me find it please?
That file is not in your current theme. It can be found in WooCommerce plugin.
Look here: https://github.com/woocommerce/woocommerce/tree/3.8.0/templates
Or read more about WooCommerce Template structure & Overriding templates via a theme

WordPress blog finding related PHP

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

Wordpress page showing content but admin for page is blank

What would cause a wordpress page to show content on the front end but be empty in the admin.
I am just taking over a someone elses site. I am trying to import the pages onto my server but I am only getting blank pages on both the front end and the back end.
Posts are showing correctly. It just most pages.
Sackling..
The problem is in charset of db. Open wp-config.php file and just change charset to utf8 & comment the old one.
define('DB_CHARSET', 'utf8');
Thanks
Look to the right side on the edit page screen, "Page Attributes" Under Page attributes look for "Page template". That probably is the reason for it to show content. Developers create page templates, add the content they want to show directly in the page template and set that page template to Wordpress Page.
A page template is basically a php file added to your active Theme's directory. You could just ftp into the server and see the files, you'll have to look into each .php file as the name of the file doesn't really matter. It could be anything.
However the page template's name which you saw on the edit page screen's dropdown, should be written in the php file's header.
So if your page template is "Custom Home", someone could have made a file called home-new.php but when you open the file you'll see something like this
<?php
/*
* Template Name: Custom Home
*/
get_header();?>
That probably is where the content is coming from.
CODEX

How to locate file of wordpress page

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.

Proper setup of custom theme for single page website + separate blog page

I am creating my first WordPress theme with a one-page parallax scrolling style.
I have created my entire website (statically) in the index.php file. It works fine if I set the Admin->Reading setting to 'Your Latest Posts'.
But now I am trying to create a separate page for the blog so I did the following:
I created a file, page.php, with the standard blog page code and gave it a template name.
I set the Blog page on wordpress to use the Blog template.
All other pages (i.e. home, about us, etc.) are set to use default
page template (which should be index.php right?)
I set the Reading settings to Front Page: Home and Posts Page: Blog
All I get is the blog page template for all pages (as if it were the default page template).
How to set up a website like this?
index.php should really be your blog template not your static home page. Make a copy of page.php to page-home.php (or whatever you've named your front page), then put the static content in there. You probably won't even need to assign the template to the page - WordPress will do that automatically based on the file name.
By default, page.php is used for all static pages, index.php is used for whatever you've assigned as your blog page in the "Reading" section of the dashboard. index.php is also the template of last resort, which will be used if WordPress can't find any other appropriate template files.

Resources