Staff image size and sorting

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #14828
    akcorcoran
    Member

    Hello –

    I need the staff featured image (image wraps) to be a 2:3 radio instead of the current wide size? If easier, I can specify a certain size, but I’d love it to auto reduce to the ratio.

    Also the sorting isn’t working – I have the most current version of the theme and the plugin for sorting. I can’t sort by title because it’s names and we’re sorting by last name.

    Please advise on how to fix both of these – I will set up a temporary login and Private reply it.

    Alexa

    p.s. I also didn’t want the page that you click through as this page is being used for Memorials but I found code for that in the previous help topics.

    #14829
    akcorcoran
    Member
    This reply has been marked as private.
    #14837
    akcorcoran
    Member

    Really looking for help here – home someone answers soon. I have 30+ photos to add so I want to know before I size them all. 🙁

    #14838
    Veena
    Moderator

    Can you pls share a link to the page?
    Are you pointing to this page – eg: https://www.livemeshthemes.com/invent/staff/# ?

    #14842
    akcorcoran
    Member
    This reply has been marked as private.
    #14851
    Veena
    Moderator

    Can you pls try to change the image size in file loop-staff.php at line no:6 .
    currently image size is set to small for staff page.

    $image_size = 'small';
    

    You can try medium, large , proportional instead of ‘small’ and see if it helps.Also you can check the possible image dimensions in file framework/framework.php(line no:197)

    Regarding sorting- Post types reorder plugin should work. Can you pls try deactivating all other plugins and check?

    #14869
    akcorcoran
    Member

    Hello –

    So, when I tried to change the image size line – both small and medium had no impact. Large actually made the photo smaller.

    Regarding changing it in framework, that will change the thumbnail size for the whole website, correct? That’s not ideal as I have used the small/medium or will be using going foward?

    For the reorder, I deactivated plugins and it still didn’t work. 🙁 I saw CSS somewhere about sorting by slug – I could at least do that if that might work? Right now, I’d have to republish everything as it is only sorting by publish date.

    This photo thing is very very urgent. I hope someone will reply. We had planned to launch last night and need the photo size resolved before we can go live.

    #14910
    Raghavendra
    Moderator

    I changed it to proportional from medium in loop-staff.php (possible values are mini, small, medium, large, full, square and proportional) and looks like that’s the best solution for the kind of thumbnails you have on the site. Pls resize manually some of the images and re-upload if they seem a little out of sync with the general layout of the site. Most of the staff thumbnails look good though.

    I have modified the two files loop-staff.php at line number 39 and framework-extender.php at line number 329 to help sort by title. Pls note down these changes since you may need these later. Looks good now.

    #14915
    akcorcoran
    Member

    Hello – Thank you for getting around to helping me with my problem.

    I do have two files that were a different size so I will change those out.

    I still have the problem of ordering – you’ve ordered now alphabetically by their first name (perhaps by title), when I specificially said that I needed them by LAST name. The only way to accomplish that with code and the plugin not working at all would be possibly by slug? I’ve made the slug (permalink) their lastname-first Can you please follow up on that issue? I have the filter by LAST NAME and people tend to think of memorials in last name, not first.

    Finally, I did not have this on a child theme and now will need to do that or I’ll lose these changes. Can you please reply with the *exact* code changes or send a private reply with them? I want to do the child theme so I don’t lose these changes in the future.

    Thank you – I hope you can look at the order again with priority. We’re already a day behind launch bc of the image size issue.

    Alexa

    #14964
    Raghavendra
    Moderator

    Pls check for sorting parameters here –

    https://codex.wordpress.org/Class_Reference/WP_Query#Order_.26_Orderby_Parameters

    and which ones can meet your needs. At present it is orderby title. You can change it to whichever works for you and I am not sure sorting by last name is possible since last and first name are separate fields here – they are part of one title. We can only provide limited customization support.

    Regarding child theme, pls check the attached file. It has instructions on how to override the MO_Framework_Extender and other classes. It is quite easy if you have PHP version 5.3 and above installed on your server.

    class MO_Custom_Framework_Extender extends MO_Framework_Extender {
    
            function change_posts_per_page($query) {
    
                if ($query->is_main_query() && !is_admin()) {
    
                    ...... /*Repeat the existing code */
    
                    if (is_tax('specialization')){
                        $post_type = get_query_var('post_type');
                        if (!$post_type){
                            $post_type = array('staff');
                            $query->set('post_type', $post_type);
                        }
                        $query->set( 'orderby', 'title' );
                        $query->set( 'order', 'ASC' );
                    }
                }
    
            }
    
    
    }
    
    if (!function_exists('mo_get_framework_extender')) {
        function mo_get_framework_extender() {
    
            $framework_extender = MO_Custom_Framework_Extender::getInstance();
            return $framework_extender;
        }
    }
    

    And pls have a new loop-staff.php in your child theme.

Viewing 10 posts - 1 through 10 (of 10 total)
  • The forum ‘Invent Theme Support’ is closed to new topics and replies.