how to find Wordpress theme homepage file source code - wordpress

my website using wordpress template and I want to edit the homepage but I can't find the source file of the homepage...i go to chrome - view source but can't find the index.php that has the source code of the homepage
how to find the file of the source code of the homepage

its depending on the file used by author. by the way, most of the themes have, home.php
front-page.php
index.php
otherwise, we can create a custom page in wp-admin and assign it as home page or front page to a wordpress, that will be configured on the settings page.
Go through it.

Start here https://codex.wordpress.org/Theme_Development to learn how WordPress themes are designed and coded.

Related

Wordpress index.php redirect

I've just installed WordPress and I want to work on the theme. So I need to have an under construction page. I made an under.html file and addressed it in the .htaccess file as a default page.
But when I want to go to mydomain.com/index.php to see the WordPress main page and work on the theme, It redirects to mydomain.com again and shows me that under.html.
Any solution to have both under.html as the default page and the wordpress first page at the same time?
If you want to show an under construction page, you can simply use a plugin.
https://wordpress.org/plugins/wp-maintenance-mode/
Hope this will work for you.

Wordpress Blog Archive page

I'm trying to make a archive page for my blog.
I have my wordpress installation at: domain.com,
The blog is on domain.com/blog
and all other pages / custom post types are working from the root
For instance I have a custom post type for clients, this cpt works on domain.com/clients with a for archive-clients.php an overview page.
Now I'm trying to make a same page for the blog but nothing is working.
The only thing that works is my index.php.
You should be able to create a file named archive.php
EDIT: more info below
If you want to have a special link for the /blog page create an extra template:
Wordpress looks for the template name to index page template listings. Example:
/*
Template Name: Blog Archive
*/
Technically, you can copy the code from the index.php or archive.php, create another file, put the copied code in it, and at the very top of the file inside of opening and closing php tags have template name code. This will allow you to create a new page named blog (or anything else) in the wordpress admin area, then you can assign it to a template named blog archive.
More information:
http://codex.wordpress.org/Page_Templates
http://codex.wordpress.org/Template_Hierarchy

Wordpress cannot find a link

I have a link in wordpress website. However, I cannot find the link to edit. I try to find it in pages and in template. I tried to edit a page but the page is empty. So where does wordpress placed my link? Is it in database or somewhere?
Thanks
Homepage template can be index.php, home.php or front-page.php located in your theme's folder.
Find out which page is being loaded as your homepage in Settings -> Reading under Front page displays.
All the content in WordPress should also be accessible from within your Admin Panel. You have to find that out yourself. Only people who have access to the Admin Panel knows about that. Ask the person who was responsible for this if you must.

How does Wordpress route index.php when a front-page.php is present in the theme?

I just set up a wp theme featuring a front-page.php.
When I point my browser to http://mydomain.com/ the front-page.php is loaded. That's ok.
But... which URL will now trigger the index.php template?
Thank you in advance for your feedback.
Matteo
index.php is the main file for the theme. It contains the code for the Main Area (below header & above footer) and will specify where the other files will be included.
Your site may be loading front-page.php because you may have set static page in your settings to be shown as home page.
Acording to wordpress official doc:
index.php
The main template. If your Theme provides its own templates, index.php must be present.
front-page.php
The front page template, it is only used if you use a static front page.
home.php
The home page template, which is the front page by default. If you use a static front page this is the template for the page with the latest posts.
See this Link for more details on wordpress template hierarchy: WordPress Codex « Theme Development « Template File List
Having said that, mention your site URL in question and may be I can help you more.

Find the source files of Wordpress

i mean i want to see the source file of the main page.
when i click right click and choice the option view source, so i want to find
the "body" of the file,and edit it physical, which folder can i find it ?
thanks friends.
WordPress's HTML is generated by PHP in conjunction with CSS, so look in your active theme folder in wp-content/themes/yourtheme. You'll find all the parts of a WordPress theme: Using Themes « WordPress Codex.
WordPress runs on the server -- the "source" you're viewing from your browser is client-side, and is essentially the output of the WordPress PHP code that generates the pages (and some CSS transforms). In order to see the PHP source, you'll have to download it from WordPress's website yourself or look at your WP installation directory on your server.

Resources