Wordpress displaying php blog page - php

I know you can create a static front page using the wordpress dashboard; however, I would like to create my custom static front page just by coding the index.php page how I like and then providing a link to the blog.
I tried doing this by linking to blog.php. However I just get met with a blank page that just contains html and body tags. Is there a way to create a static front page site and just link to the blog without using the dashboard?
I don't like how using the dashboard to create a page automatically puts a heading tag on your page. Also, I don't know how to link to just the blog page without including links to all the other pages using <?php wp_list_pages( '&title_li=' ); ?>

Related

Dynamic body in html for making wordpress theme

Can you help me, please ? Maybe this question is stupid but I am new in Wordpress. First I have created project using html and css, javascript. Then, I have converted my html code to wordpress theme. For example I have written get_header() instead of html head and get_footer() instead of html footer. Finally I must do dynamic my project's body but I can't. For example when i change page, header and footer must stay in its place but body must changing. Problem is I do not know to write code in my body section. my code's seem
I have called my other section though get_template_part().
I have tried to write my html code in adding wordpress page, to be more clear, in wordpress dashboard. When I change page, body's seem must changing.
What should i do, please ?
In your templates add the HTML of particular pages like the home page and other cms pages and in the admin dashboard go to the Pages section in the page template and assign the particular page template for example you have created a home page template for the main page go to pages in admin dashboard in page template assign the home page to the page then you can see the HTML of the page on frontend.

opencart: How to add static html home page and change logo and navbar link to it

I am new to using Opencart and Php open source frameworks in general, and have been searching the forums and haven't found anything to create a non-default home page that is simply static html with no database it needs.
I was wondering how to do this in the source code, if it is possible.
So far I have created an index.html file and that shows up as the home page. But when I click the logo for the site, it goes back to the index.php file, to be exact: yourstoreurl/index.php?route=common/home
Secondarily, I will likely want more than one static page, not just home, and would like them to show up in the navbar where the tabs for your products are displayed. For instance, in the default site, have navbar links for "home" which I want to be static html, and "about" which I want to be static html, before "Desktops" and "Laptops and Notebooks" https://demo.opencart.com/
How could this be done?
The reason I want to do this is to have some written content at the entrance of the site, and have html & css experience so would like to create it that way.
Sorry, bro open cart is a database-backed app.
Use a custom static web page as your home page, put your shop in a subdirectory, and put a link on the home page to the shop.

PHP: Wordpress Test Page

The problem!
I have a Wordpress site up and running. I wanted to add a custom page, for example if I browse to site.com/mytest it would display just Hello world without any css etc.
What I've tried
I added a mytest.php file under var/www/wp-content/ and tried to browse to it. (The code simply echo a static text).
What I got was simply a 404 page by Wordpress.
To view the file you uploaded, browse: site.com/wp-content/mytest.php
If you just type site.com/mytest , wordpress will thin you are reffering to a page stored in the wp-database. Since it's not you cant view it.
To add the page in the menu, use custom menu and add as "Custom link".
You can make your page a wp custom page template by adding this at the top:
/*
Template Name:Your Page Name
*/
Then create a page in the wordpress dashboard pages and select your page template from the page template dropdown.

Default WordPress navigation for single page theme

I have found a similar question here: Single Page Navigation Menu Dynamically Generated but I am not too sure how or even if this will work with what I am doing.
I am building a single page theme, in which every time the user creates a new page a new <section id="page-title"></section> is created and filled with the supplied content. I have all that working fine, but I am trying to use WordPress's default navigation. As in when a user creates a new page, it automatically gets added to the nav menu. Right now I have that working of course, but the links point to the page permalinks which I do not want. I need the page to point to a url like '/#page-title'
How can I adjust the wordpress wp_nav_menu(); function to display the # hashtag and the page title for the navigation instead of the permalink?

Link to custom php theme page in wordpress

I want to link a template php page (header.php) to a custom php page (cmenu.php) I made in the same theme.
I've searched on a lot of websites via google and also through the Wordpress Codex on how to accomplish this but I can't seem to find it.
In my header.php page I have a div which I want to have an url href link to my custom menu called cmenu.php. (I want to link it to that page to be more mobile friendly.)
I tried te following codes I found in the codex and google but none of them work:
get_cmenu()
get_template_part('cmenu')
Make the page you want to link to a template page and make a page and assign that template to it.
In a template page you can run all custom code you want.

Categories