queue  1126
support custom
Results 1 to 8 of 8

Thread: Rework - Site Directory Structure

  1. #1
    Junior Member
    Join Date
    Oct 2012
    Posts
    3

    Rework - Site Directory Structure

    Great theme that I'm looking to customize for a non-profit organization, not a creative business. I'm going to use the Projects, Staff and Pricing pages, but having them named projects, staff and ptable won't make sense to the end user or for SEO (for example the staff pages will show the committee). Can the Pixelentity team, or anyone that has made these changes help point me to the files and lines that need the updates, or even a quick solution? My coding skills are ok, not great, but I don't mind doing the research that would help me learn something that is complex.

  2. #2
    Lead Coder Fabio's Avatar
    Join Date
    Aug 2011
    Posts
    1,880
    If you want to change the rewrite slug for those custom post types, i'd suggest to first take a look at wordpress.org to see if there's a plugin that let you do the change in the wp admin area.
    If nothing exists, you could edit theme files but this changes will be overwritten each time you update the theme and would need to redone

    edit the files
    Code:
    theme/php/PeTheme/PeThemeRework.php
    framework/php/PeTheme/PeThemeStaff.php
    framework/php/PeTheme/PeThemeService.php
    framework/php/PeTheme/PeThemePricingTable.php
    find where the custom post type is defined (search for)
    PHP Code:
    PeGlobal::$config["post_types"
    then add a custom rewrite slug to the post type array

    PHP Code:
    'public' => true,
    'has_archive' => false,
    // add the following
    'rewrite' => array('slug'=>'YOUR_CUSTOM_URL'), 
    after you do the changes, remember to visit your permalink page in wp admin and save it, this way all rewrite rules will be updated.
    You will also need to create theme template files for staff/ptable if you want to use them directly (like projects) because in Rework they are not as you would add staff via shortcode and ptables via pricing table page template
    My cave is full of servers

  3. #3
    I don't know if I get Julian right, but wouldn't it be easier just to change the Permalinks settings in Dashboard -> Settings-> Permalinks to /%postname%/ and if more finetuning is needed, change the linkname/slug on the single page or article???

  4. #4
    Junior Member
    Join Date
    Oct 2012
    Posts
    3
    Thanks Fabio, I appreciate the quick response. I tried some of the URL rewrite plugins, but unfortunately the theme itself overwrites the updates or changes made. Thanks for your input too vrgrafik, but it seems that the permalink settings don't impact these pages because they're part of the theme - the directory appears by default and you can only edit the slug after it... I'll keep my eye out for any other responses or recommendations, but I'll give Fabio's suggestion a try, and deal with the updates as they happen.

  5. #5
    Junior Member
    Join Date
    Oct 2012
    Posts
    3
    Thanks Fabio - Just wanted to let you know that your solution was, quick and easy, and perfect for me. You also pre-empted what was likely to be my next question... I've created the template I need for the staff member page, how or where do I apply it?, or can I add the template-dropdown option on the staff page?

  6. #6
    Lead Coder Fabio's Avatar
    Join Date
    Aug 2011
    Posts
    1,880
    you just need to name the file single-staff.php and wordpress will use it automatically
    My cave is full of servers

  7. #7

    Would like to do the same but for individual projects

    Hi,

    I tried to apply this to re-naming the slug for individual projects so that instead of www.website.com/project/nameofproject it would be www.website.com/product/nameofproject but it doesn't work. What else do I need to amend in order to get it to work?

  8. #8
    Lead Coder Fabio's Avatar
    Join Date
    Aug 2011
    Posts
    1,880
    what you mean by "it doesn't work" exactly ? if you're getting a 404 error, you need to revisit your permalink page in wordpress.
    this way the new structure will be saved.
    My cave is full of servers