Jayesh
Jayesh

Reputation: 3951

Wordpress theme editing

Well, I am a newbie with Wordpress.

I just got a free wordpress theme. I want to edit the pages to my customization. I have a shared host which provides MySQL database.

Can I edit this wordpress theme to connect to this MySQL database and pull/push data in to my database?

Is the whole process similar to working with normal php and MySQL? Whats so much difference with the set of php's being a Wordpress theme?

Thanks

Upvotes: 0

Views: 1001

Answers (5)

Eric Giguere
Eric Giguere

Reputation: 3505

A theme is a collection of PHP files along with related files (CSS, JavaScript, images, etc.) that control the appearance of the WordPress site. The content (posts, pages, comments, options, plugin configuration, etc.) of the blog is stored in the database. Any themes on the site are thus separate from the content.

Themes can normally be edited directly from the WordPress admin console. Click on "Appearance" and then on "Editor". You can then edit any of the current theme's files from there. Useful for tweaking things if you know what you're doing, but dangerous in some ways because there's no easy way to undo your changes. Do a backup of your theme before noodling with it.

This entry in the WordPress Codex will help:

http://codex.wordpress.org/Editing_Files

Upvotes: 0

UncleZeiv
UncleZeiv

Reputation: 18488

Themes are just a bunch of php files which get executed in response to some particular event (basically when a particular kind of page nees to be rendered). You can do whatever you want in them, but everything which is not meant to be "aestethic" should probably be developed in a separate set of custom plugins. You then call those from your theme.

Upvotes: 1

Surreal Dreams
Surreal Dreams

Reputation: 26380

The short answer - there are a number of different templates for the index, search, archive, page and article views of a Wordpress theme. Some themes don't include all of them - certain templates are the default for the other optional templates. You can edit them with software like Dreamweaver or a text editor of you choice, or you can alter them from the Wordpress admin panel.

Wordpress themes are a little too complicated to explain in one simple answer, but I can recommend a tutorial. It's a little dated, but it will explain the overall ideas and it's quite good.

Here's another - I've not read it over but it looks to be well done: http://themeshaper.com/wordpress-themes-templates-tutorial/

Upvotes: 0

devasia2112
devasia2112

Reputation: 6034

The theme is just the interfacce of your system, on your theme you only show the data, you need to run a select for instance in the apropriate part, also for the bussines logic.

If you do in the interface, in time your system will mess up.

In the official documentation have plenty of examples and How to's,..

Upvotes: 0

EvanGWatkins
EvanGWatkins

Reputation: 1457

Once you have wordpress installed with the hosting provider and the database connection between the WP installation and the hosting provider MySQL database you can edit your theme through WP itself.

Make sure you set the permissions on the WP-Templates (I think thats what it is called) folder to read/write so that wordpress can write to the template files.

View the following link for any help editing the template. How to edit a WP Template

Upvotes: 0

Related Questions