New Landing How can we help? Themeforest Theme Support Neighborhood Customizing the URL for portfolio and products

Viewing 15 posts - 16 through 30 (of 36 total)
  • #64236
    Roger Henriksen
    Member
    Post count: 39

    That sounds great! I will backup functions.php to my local files if I want to edit this file later.

    Thanks for superb help!

    #64244
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    You most welcome . I’m glad that issue resolved .
    Thanks ๐Ÿ™‚
    With Best Regards
    Swift Ideas

    #65172
    Roger Henriksen
    Member
    Post count: 39

    Hi
    We have tested the site thoroughly and found that there are problems with the translation of product related pages. Example: The text “Showing all 11 products” on this page http://www.taga.no/wp2013/produkter/ and “Description”, “Additional information” etc. on http://www.taga.no/wp2013/produkt/taga-chistorra/ (all product pages)

    I have translated it in WPML, but changes doesn’t show. Do you think this may be related to the changes? The translations worked fine until we updated functions.php

    Best regards,
    Roger

    #65560
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    This is not related to the changes and please contact to plugin developer about this issue .
    Thanks

    #66432
    lobsterass
    Member
    Post count: 386

    I have the same request. I want to edit my portfolio items URLs. I also have the WPML plugin. WPML is not active yet though.

    In other words, I need a solution that will work both for my Swedish version of the site and also later the English one.

    This thread doesn’t show what you guys did to edit the URLs. Please let me know too.

    Also, I believe the ability to change URL on porfolio items is basic SEO that really should be there in the next update of Neighborhood.

    Cheers!

    #66770
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Hi

    Thanks for the feedback, will let the developer know and will hopefully be able to get this implemented

    – Kyle

    #66784
    kastyles
    Member
    Post count: 123

    Another vote for the URLs. Im not using the portfolio option as much as id like because of he URLs.

    #66912
    lobsterass
    Member
    Post count: 386

    OK. But just to make it clear, do you guys mean that we can’t edit the portfolio URL:s even in the main language (without the WPML plugin being involved)?

    #66914
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hi @lobsterass,

    Not sure if I’m following what you mean? Do you mean the item name in the URL, or the base “/portfolio”?

    – Ed

    #66927
    lobsterass
    Member
    Post count: 386

    Hi!

    I don’t necessarily need the base. The most important thing for me is to be able to create SEO-friendly URL:s that somewhat corresponds to my H1 on that page.

    For example, for a portfolio item with lets say a book cover design I made, I want to be able to call it something like:

    http://monroedesign.se/graphic-design-bookcover-italy-book/

    <3

    #66952
    kastyles
    Member
    Post count: 123

    SEO and ‘pretty’.

    For me.

    This is what it is- http://kastylephotography.net/?portfolio=wedding

    Id like- http://kastylephotography.net/portfolio/wedding

    My last couple themes generated URLs like above url/portfolio/name.

    #67098
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,

    @kastyles

    Please open to edit portfolio-type.php at /themes/neighborhood/includes/custom-post-types

    Find this code at line 49
    'rewrite' => false,
    Replace with 
    'rewrite' => array('slug'=>'portfolio'),

    ———————- OR ———————————

    Please put this code at your functions.php under child theme directory
    remove_action( 'init', 'portfolio_register' );
    add_action('init', 'portfolio_register_new');  
      
    function portfolio_register_new() {  
    
        $labels = array(
            'name' => _x('Portfolio', 'post type general name', "swiftframework"),
            'singular_name' => _x('Portfolio Item', 'post type singular name', "swiftframework"),
            'add_new' => _x('Add New', 'portfolio item', "swiftframework"),
            'add_new_item' => __('Add New Portfolio Item', "swiftframework"),
            'edit_item' => __('Edit Portfolio Item', "swiftframework"),
            'new_item' => __('New Portfolio Item', "swiftframework"),
            'view_item' => __('View Portfolio Item', "swiftframework"),
            'search_items' => __('Search Portfolio', "swiftframework"),
            'not_found' =>  __('No portfolio items have been added yet', "swiftframework"),
            'not_found_in_trash' => __('Nothing found in Trash', "swiftframework"),
            'parent_item_colon' => ''
        );
    
        $args = array(  
            'labels' => $labels,  
            'public' => true,  
            'show_ui' => true,
            'show_in_menu' => true,
            'show_in_nav_menus' => false,
            'menu_icon' => 'dashicons-format-image',
            'rewrite' => array('slug'=>'portfolio'),,
            'supports' => array('title', 'editor', 'thumbnail'),
            'has_archive' => true,
            'taxonomies' => array('portfolio-category')
           );  
      
        register_post_type( 'portfolio' , $args );  
    }  

    Thanks ๐Ÿ™‚
    With Best Regards
    Swift Ideas

    #67257
    kastyles
    Member
    Post count: 123

    Thank you, I’ll try it out today!

    #67260
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    No problem ๐Ÿ™‚

    – Kyle

    #67294
    lobsterass
    Member
    Post count: 386

    Hi Kyle and Mohammad,

    I’ve spent 2 hours trying to do this. Please provide all the info needed.

    I edited portfolio-type.php at /themes/neighborhood/includes/custom-post-types
    and I found line 49
    ‘rewrite’ => false,
    and I replaced with
    ‘rewrite’ => array(‘slug’=>’portfolio’),

    Then my portfolio links obviously stopped working. Where do I edit the portfolio item URL:s?

    I also tried the functions.php but I have no clue where to edit what in where? There’s no headline for CHILD THEME there…and when I search for ( ‘init’, ‘portfolio_register’ ); nothing comes up.

    Very frustrating. I had to change back the portfolio-type.php now as my site is live.

    Please help.

Viewing 15 posts - 16 through 30 (of 36 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register