Your address will show here +12 34 56 78

Home Forums WP RESIDENCE – Real Estate WordPress Theme FORUM Change Permalinks in WP RESIDENCE –

This topic contains 9 replies, has 5 voices, and was last updated by  Anna 2 years, 2 months ago.

  • Author
    Posts
  • #42519

    Anna
    Keymaster

    NOTE: all these codes, you should manually type them and not copy paste as it’s possibly you’re copying wrong formatted characters.

     

    To change estate_property in URL http://wpresidence.net/estate_property/villa-on-washington-ave/

    go to folder libs – property.php

    look for these lines (are at the beginning)

    ‘public’ => true,
    ‘has_archive’ => true,
    ‘rewrite’ => array(‘slug’ => ‘properties’),

    Edit “properties” with your text. Save. Then go to Admin – Settings – Permalinks – Set Default – Save. Then set custom Save the current settings again.

    —————

    To change Property slugs (category, city, area and action).

    For Category, go to LIBS folder – property.php

    Look for this code

    ////////////////////////////////////////////////////////////////////////////////////////////////
    // Add custom taxomies
    ////////////////////////////////////////////////////////////////////////////////////////////////
    register_taxonomy(‘property_category’, ‘estate_property’, array(
    ‘labels’ => array(
    ‘name’ => __(‘Categories’,’wpestate’),
    ‘add_new_item’ => __(‘Add New Property Category’,’wpestate’),
    ‘new_item_name’ => __(‘New Property Category’,’wpestate’)
    ),
    ‘hierarchical’ => true,
    ‘query_var’ => true,
    ‘rewrite’ => array( ‘slug’ => ‘listings’ )
    )
    );

    Replace
    ‘rewrite’ => array( ‘slug’ => ‘listings’ )

    with
    ‘rewrite’ => array(‘slug’ => ‘property_category_changed’),
    )

    Replace property_category_changed with the new name.

    ———

    Repeat this for Action, Area and City (all in the same file).

    When you are done, change permalinks to default and then again to custom.

    —————

    To change AGENTS in URL http://wpresidence.net/agents/maria-barlow/

    Go to LIBS folder – agents.php file

    ‘rewrite’ => array(‘slug’ => ‘agents’)

    Edit “agents”. Then go to Admin – Permalinks and click the Save Button (for changes to take effect).

    —-HOW TO MAKE CHANGES IN CHILD THEME – from a client —-

    Ok, I’ve tried it. I’ve put the property.php in a child theme’s sub folder named “lib” (like the origininal one). Then I created a functions.php in the root of the child theme and added this code:

    <?php
    require_once ('libs/property.php');
    ?>

    And… that works! For othe files like agents.php, it surely works the same way.

    • This topic was modified 3 years, 3 months ago by  Anna.
    • This topic was modified 3 years, 3 months ago by  Anna.
    • This topic was modified 2 years, 7 months ago by  Anna.
    • This topic was modified 2 years, 3 months ago by  Anna.
    • This topic was modified 2 years, 3 months ago by  Anna.
    • This topic was modified 1 year, 9 months ago by  Anna.
    • This topic was modified 1 year, 9 months ago by  Anna.
  • #47980

    Sargantana

    Hi Anna

    I changed property.php to

    ‘rewrite’ => array(‘slug’ => ‘inmuebles’)

    And it’s working fine: http://www.xxxxx.com/inmuebles/oficina-alfa

    But it’s not working when clicking on pin on Google map, url link appears as: http://www.xxxxx.com/properties/oficina-alfa, and shows “Page not found”.

    How can I ammend this?

    I’m using WP-Residence 1.03

    Thanks!

  • #48007

    Sargantana

    I’m sorry about this issue, Anna. I upgraded my theme from 1.02 to 1.03 and that overwrote my property.php and agents.php files.

    Thanks anyway. Problem solved!

  • #100372

    Wolfram
    Participant

    Hi Anna,

    is it possible, to use the property.php anywhere in the child theme folder, so that the changes are kept when updating the theme? Or is there any other solution for keeping the changes?

    Thanks
    Wolfram

  • #100383

    Anna
    Keymaster

    Hi Wolfram

    You can try that but you need to know how to work with code in child theme – I can only give wordpress help – http://codex.wordpress.org/Child_Themes

    Thank you
    Anna

  • #100394

    Wolfram
    Participant

    Hi Anna,

    thank you again. Your support ist fabulous 😉

    Ok, I’ve tried it. I’ve put the property.php in a child theme’s sub folder named “lib” (like the origininal one). Then I created a functions.php in the root of the child theme and added this code:

    <?php
    require_once ('libs/property.php');
    ?>

    And… that works! For othe files like agents.php, it surely works the same way.

  • #103943

    Nick
    Participant

    Thank you!

    Unfortunately it doesn’t work with libs/widgets/contact_widget.php.
    require_once 'libs/widgets/contact_widget.php';
    Any idea, why?

  • #103944

    Nick
    Participant

    Also this doesn’t work:
    require_once 'libs/widgets.php';

  • #113616

    mfalcuta
    Participant

    ‘rewrite’ => array(‘slug’ => ‘properties’)

    doesn’t appear in libs/property.php

    where can I change “properties”

  • #113692

    Anna
    Keymaster

    Hi

    It’s in there – please look again. I made you a screenshot – http://i.imgur.com/rgw7JI2.png

    It’s after has_archive. This is the topic for Residence though. Hope you’re looking at the same theme.

    Anna

You must be logged in to reply to this topic.