Custom Templates

This topic contains 6 replies, has 2 voices, and was last updated by  Ian Butler 9 years, 3 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #27115

    Ian Butler
    Buyer
    Post count: 59

    Hi Guys,

    I’d like to create some custom page templates.

    Do I put them in the following place?

    themename/geodirectory/geodirectory-templates/geodir-home.php

    Also how would I then assign a WordPress page to use one of these templates?

    Thanks

    #27117

    Guust
    Moderator
    Post count: 29970

    It seems you want to create a page template for wordpress pages, not for GD pages.
    You need to add them to your child theme.

    http://codex.wordpress.org/Page_Templates

    Let us know if I misunderstood.

    #27120

    Ian Butler
    Buyer
    Post count: 59

    I think you misunderstood.

    As I’m not using geodir-home.php I did the following.

    Page template created normal WP way then I copied the snippets of code I need from geodir-home.php to create a custom page

    #27121

    Guust
    Moderator
    Post count: 29970

    Why not just add GD widgets to your homepage?
    What are you trying to do with your homepage? What do you want to show?

    #27122

    Ian Butler
    Buyer
    Post count: 59

    It’s not for the homepage.

    I want a custom page which pulls in certain elements from GD

    It will be a landing page for logged in business users and will need to contain things like:

    Dashboard widget
    Add place button
    Add event button
    Upgrade/edit existing listings

    #27123

    Guust
    Moderator
    Post count: 29970

    That sounds very much like the author page:
    GD > design > author
    For example:
    http://wpgeo.directory/author/john/?geodir_dashbord=true&stype=gd_place&list=favourite
    Change john with your username once you registered.

    If you post your URL and admin details, then we can have a look at your settings. That is a standard page you are trying to create.
    Also have a look here: https://wpgeodirectory.com/support/topic/author-pages-just-show-either-events-or-places/#post-26502

    #27127

    Ian Butler
    Buyer
    Post count: 59

    Okay that looks good.

    global $current_user;
    $username = $current_user->user_login;

    /author/<?php echo $username ?>/?geodir_dashboard=true&stype=gd_place

    Thanks for your help

Viewing 7 posts - 1 through 7 (of 7 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket