Tagged: x
-
AuthorPosts
-
November 2, 2016 at 11:59 am #1241088
FIGkbParticipantHi-
Couple questions:
1) Portfolio page: We use the portfolio page to sort a clients’ different donors. We want to be able to sort them alphabetically. I’ve seen other posts about adding code that would change the ordering to alphabetically- with a recommendation about creating a child theme.
I have a couple questions about creating a child theme before we did this–
1) If I were to install the child theme and activate it on a live site, would it override all the current settings used on the theme activated now? (For instance, the CSS and java added in the ‘Customizer’ or any of the other settings in there?)
2) I’ve already done some customizing to the portfolio page (see this thread). Is there a way to make the change to sorting alphabetically, keep the ones from previous thread?
I know the best solution includes creating a child theme: but I just wanted to make sure by creating one I wouldn’t lose/ have to re-enter all my settings.
For reference: here’s the page in question: https://seedinglabs.org/our-donors/
I know that’s a lot of questions- let me know if I need to clarify or anything! The site is currently updated with latest theme + cornerstone + wordpress.
November 2, 2016 at 3:45 pm #1241400
LelyModeratorHi There,
1.) All customizer settings will be intact. Although it is recommended to save customizer settings via Addons > Customizer > Export. If you didn’t edit or update any file on this folder wp-content/themes/x child theme will work just fine. Child theme will inherit all designs and functionalities of main X theme. It is also recommended to backup your site before doing this.
2.) This customization should be move to the child theme. If you have done this on main X theme file, we just need to copy the same file on the same folder on your X theme.
To answer your question, yes you can keep that customization intact. We will not touch that file to sort portfolio alphabetically. We just need to add the following on your child theme’s functions.php file: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 by Title*/ $wp_query->set('orderby', 'title'); /* un-comment if not using random order */ $wp_query->set('order', 'ASC'); } } /* Change Order settings before displaying the Postype*/ add_filter('pre_get_posts', 'cmk_custom_order'); //* Integrity Entry Nav Below ContentI would recommend for you to setup a staging/development site. This is so you can do all this things on staging and keep your live site intact. After doing this on the staging, you can proceed to do the same steps on the live site.
Hope this helps.
November 8, 2016 at 5:53 pm #1249346
FIGkbParticipantThis reply has been marked as private.November 9, 2016 at 3:59 am #1249780
ChristianModeratorThat would require additional customization to the code given previously. Regretfully, further customizations from here would be getting into custom development, which is outside the scope of support we can offer. If you need more in depth changes, you might want to contact our trusted partners who caters X setup and customization needs. Please see https://community.theme.co/custom-development/
Thanks.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1241088 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
