Standard HTML & CSS to wordpress page - php

I created a webpage in Standard HTML and CSS and everything looks / works exactly how I want it too.
Now I need it to appear as it is on a wordpress site (http://www.texasenergyessentials.com/). I already created a template page and can see it in the template select in the wordpress "add new page" window. I was hoping I could just select the template and leave the text editor blank but that doesn't seem to be the case. All I get is a completely un-formatted page that says welcome guest.
What is the easiest way to get https://gist.github.com/anonymous/8545681 to work on the aforementioned wordpress site? ?
Thanks!
P.S. Please don't link any codex files I just spent 2 hours digging around in them :(

Try to read and understand how http://codex.wordpress.org/The_Loop works
Install this theme https://code.google.com/p/wordpress-naked/ and try to work your way to the desired theme by editing theme files. That will be much easier.

Maybe the problem can be understood by reading the template hierarchy:
http://codex.wordpress.org/Template_Hierarchy
(especially check the visual overview)
If you name your file page-[insert-page-id-here].php Wordpress will use it for the page you've created. Get your page id by editing the page and looking it up in the url.

Related

How do you get a custom template.php file with content in wordpress page attribute setting, to have content searchable on the site via search.php

Hi I am trying to understand something I feel is rather complex.
Lets say I create a custom template file and add it to the page attributes of the Wordpress page editor to use. In that template file I am echo ing out some PHP functions and other content that is not stored in the database.
Using the custom template file, does not go through the_content() function either.
So on the front end of the site, I try to search exact phrases I have loaded via a custom template file and it will not return any results.
However any content I have loaded traditionally though TinyMCS Wysiwyg utilizing the_content() function in the default template will show and work fine when doing a search on the front end of the site.
Any help would be appreciate or any ideas for additional research would be helpful to thanks in advance.
Ive conducted countless hours of research, along with the Plugin Author of Relevanssi Better Search for Wordpress.
So I wanted to share the solutions here.
https://wordpress.org/support/topic/search-not-including-php-hard-coded-content/#post-14432554
This Stack Overflow question is also related to this question here

Empty links in Wordpress

I got my own created template in Wordpress. I got two pages : index.php and ab.php. My question is what should be a proper link code that links these two pages in menu? Because I always get 404 page or index.php page or blank. I try'ed everything including saving permalinks.
Here are a few of my examples:
http://example.com/?p=ab
http://example.com/?p=ab.php
<a href ="ab.php">
etc.
My guess is that this is your first WP theme.
If that is the case I should tell that the hierarchy from pure php websites won't work. Check this https://developer.wordpress.org/themes/basics/template-hierarchy/ WP uses the wp-admin part for creating new pages.
If you are switching from php to WP, I think I can help a bit by giving few pointers.
If there is an issue with your project I can't quite get what is happening but if you call http://example.com/ab.php the php inside will run however it's not cool to reference pages that way in WP.

How do I use an Inspector to find the HTML in a theme's PHP files?

I'm working on a Wordpress website for someone and I have a question. I used an inspector (firebug) to check out the html of my site but I need to know where to find that bit of code in the Wordpress theme (Spacing) php files. There's no search all feature and going through all of them separately is ridiculous.
I really appreciate any help you can offer!!
I found an article on it (https://wordpress.org/support/topic/search-through-php-files) but there really wasn't a solution. If I can find what I'm looking for in the HTML (it's a menu name by the way), why can't I go find it in the theme files??
I don't know if this matters but the HTML is a body class to a couple of div classes to a ul id to li id to an a class.
WP does not contain ant HTML page. Everything in WordPress php file. If your page is created in page section you have to check in page.php file in /wp-content/themes/{your theme name}/page.php or if your page is posts you to check in post.php
What you want to change in WordPress site ?
If you go into the back-end/admin section and click "Pages". Find the page you are working on and click edit. In the "Page Attributes" you can see what "Template" it is using.
Then you can find that template in /wp-content/themes/yourtheme/
EDIT: More than likely the header and navigation is located in the "header.php" file in the themes folder.

Edit WP html code, but cannot find the page

I am new to Word Press and I have been assigned to change something at work in our homepage.
I am always worked with raw HTML/CSS/php files, so I am a bit out of place here.
The page in question is the following: GAN Integrity Solutions Products
Inspecting the html I found where the CSS is (in the theme folder).
If I go in word press under pages, and I choose Products (which is the page I want) there is not content in it even in the text or visual editor. (but the page does indeed have content)
I installed the plugin called "Always edit in HTML" but it only removes the Visual tab and does not really replace it with the HTML tab (like I have seen a friend of mine has).
Also I am currently using WP v. 3.7.1 and I have not update because I still had to learn what happens when one updates (does it screw up my site? I can't afford to screw it up).
Anyone have any idea of what I am doing wrong or how I can solve this?
Btw the different "products" are created individually under "Portfolio" but what I would like to edit is that first link page html. What I need to do is instead of having pictures in the "squares" and then text as ones mouse over them, the reverse.
I would appreciate it!
Can you try to login in Wordpress?
You should go to pages and search for the product page.
Then check the template part.
Go to your themes map again and search for that template.
Your code should be there.
This is my first comment. Hope it is helpfull.

wordpress use in own template

I've created an HTML page as part of my website which I would like to use as a template for news articles. The page has all the things it needs, it just needs to display the correct news article in it.
I installed WordPress on my webserver and now wonder how I can have wordpress publish articles using my HTML page?
Is this even possible since WordPress works with php?
thanks
What you are talking about is themes. Wordpress allows you to create a theme for your installation so it displays using your html/css (more or less)
The way I do this is copy the default theme and make changes in there, and then you can switch to your new theme in your settings.
Edit: in addition, you can also load up wordpress on any page using:
include( '/path_to/wordpress_install/wp-load.php' );
This will allow you to use wordpress functionality on any page of your site.
just edited the single.php file by pasting the desired html code and leaving the loop code there where the text needed to show up.
didn't need to break up the page in a header, body and footer. Left out sidebar for now, but will put it back after I edit it properly.

Categories