Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #254806

    May R
    Participant

    Hello there.

    Is there a way to change the name of the Portfolio Sorter? By default, it’s called “Sort Portfolio”, but we’re wondering if even that can be updated?

    Also, by doing so, will it change the URL path in the browser as well? For example:

    http://www.your-site.com/portfolio-item/xyz

    Will that “portfolio-item” be changed as well if we’re able to change the name of the sorter?

    Also, are we able to change the “order” of the portfolio items as well?

    We tried adding a new item, but it only lists them in alphabetical order. Can we rearrange that to our liking also?

    Please advise.

    Thanks.

    -May

    #254822

    Zeshan
    Member

    Hi May,

    Thanks for writing in! To assist you with this, we’ll first need you to provide us with your URL as stated on the forum entrance page. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you.

    Thanks!

    #255036

    May R
    Participant

    Ok. The URL for the site I’m working on is:

    tot.lamontwilkinscreations.com/spoken-word

    Thanks.

    -May

    #255258

    Darshana
    Moderator

    Hi there,

    #1. You can change the Sort Button Text under Customizer > Integrity > Portfolio Options. You can load the Customizer through Appearance -> Customize menu.

    #2. For the time being, the best option is to change the date of your portfolio items.

    If you have some programming knowledge, you can setup a child theme which allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

    Once you have activated the child theme, you can place the following code into the Child Theme’s functions.php file and implement the necessary adjustments.

    Following example will randomly select portfolio items.

    
    function cmk_custom_order( $wp_query ) {
         /* Get the post type from the query*/
        $post_type = $wp_query->query['post_type'];
        /*If Post type is Portfolio*/
        if ( $post_type == 'x-portfolio') {
        /* Set Order to Random*/
    	$wp_query->set('orderby', 'rand');
        /* un-comment if not using random order */
        //$wp_query->set('order', 'DESC');
        }
    }
    /* Change Order settings before displaying the Postype*/
    add_filter('pre_get_posts', 'cmk_custom_order');
    

    Hope that helps.

    #255265

    May R
    Participant

    Thanks for answering our questions. We’re not familiar with advanced coding and have only a little experience setting up child themes – thanks anyway for the explanation.

    Also, in answer to your #1 response, just to make sure we’re on the same page…if we wanted the “Sort Portfolio” to say “Something Else” we can do that in the customizer. Is that what you’re saying?

    Lastly, how do we change the dates of portfolio items?
    Do we do that under the Portfolio tab somewhere in WordPress? How does it sort? From most recent to oldest?

    Thanks.
    -May

    #255267

    May R
    Participant

    Also, we don’t necessarily want to have the Portfolio Items set to Random, we’d rather be able to do them on as we please and thought there might be a way other way .php mods and such. Totally NOT familiar with that stuff and scared to even attempt to try it at this point.

    Thanks.

    -May

    #255492

    Christopher
    Moderator

    Hi there,

    #1 Yes. you can change it in customizer.

    Dallas Commercial Photography

    #2 You can change publish date for portfolio items.

    Dallas Commercial Photography

    Hope it helps.