Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


cza

cza

27 posts

Geek


#101918 11-May-2012 17:59
Send private message

Hi there,

I was wondering if a wordpress guru point me in the right direction please?  I have done quite a bit of googling on this over the last couple of weeks but dont seem to have found a conclusive answer or solution.

What I have been trying to do is find a way to create a static/physical page which will display some of our own forms that we want to run.

It is pretty basic stuff like a form that we fill in which logs the time we have spent on work for a client, who the client was and things like that. This uses php and connects to a table which I will create.  I know you can install a plug in that lets you add php code to a page, but I thought a better way to do it would be to create my own physical pages and just link to them via the nav (these will only be accessible by registered users, so will probably try to reuse the session that gets created when user logs in).

I have sort of found a way to add a link in the main navigation to a static page, by adding it to the functions.php file in the theme, but the link only shows up on 1 page i.e. when you click on the link the resulting page doesnt contain that link on the nav.

I guess the main questions are:

How do I create a static page which uses our current theme which I can put my own code on to run the form (as outlined above)?

How do I then add a constant link to this page in the main nav (was I on the right path with the functions.php file and did something wrong)?

And probably, is this even the best way to go about this?

I am still very new to wordpress, and finding my way around, so any tips or pointers are greatly appreciated.

Thanks

Create new topic
itxtme
2102 posts

Uber Geek
+1 received by user: 557


  #623805 11-May-2012 22:16
Send private message

The easiest way to do it would to create the page as you would any other and then add a redirection tag to it.  So wordpress skin structure uses its normal behaviour sets to create the menus etc.  You can then use native rules as to permissions etc.  

A good example plugin would be "Redirection" http://wordpress.org/extend/plugins/redirection/

Custom 'pass-through' redirections allowing you to pass a URL through to another page, file, or website.



cza

cza

27 posts

Geek


  #623885 12-May-2012 08:37
Send private message

Awesome thanks for that I will give that a crack this morning and post back.

cza

cza

27 posts

Geek


  #626375 16-May-2012 18:27
Send private message

I have had a bit of a crack at the redirection plug in over the last couple of days and it doesnt seem to work that well (that being said it is highly likely it is something I am doing).

I can get it to redirect to a basic page with nothing in there but some text, but I tried to get it to redirect to a copy of the index.php page from the root of the theme dir and I got a php error around the header function - undefined function get_header().

After thinking about this though I wonder whether using a redirect is the best way to do this.

It looks like it may work ok for 1 page, but if I am wanting a number of pages which link through to more pages I am not sure how this will work.

Another example that I am working on at the moment is a bit of functionality where I have a table of clients, and the clients can log in and update details like mailing address and things like that and I wonder whether using this redirect is the best way to go about it.

Do I need to perhaps look into creating plugins?

Has anyone else had much experience creating custom pages, maintaining the theme, and things like that?

Create new topic








Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.