NiceThemesStaff Order with Department – NiceThemes http://nicethemeswp.com/forums/topic/staff-order-with-department/feed/ Wed, 23 Apr 2025 14:39:15 +0000 http://bbpress.org/?v=2.5.12-6148 en-US http://nicethemeswp.com/forums/topic/staff-order-with-department/#post-2794 <![CDATA[Staff Order with Department]]> http://nicethemeswp.com/forums/topic/staff-order-with-department/#post-2794 Tue, 17 Dec 2013 20:57:51 +0000 orlandpcs How do I edit the Staff order with the department page? Thanks!

]]>
http://nicethemeswp.com/forums/topic/staff-order-with-department/#post-2796 <![CDATA[Reply To: Staff Order with Department]]> http://nicethemeswp.com/forums/topic/staff-order-with-department/#post-2796 Tue, 17 Dec 2013 21:05:13 +0000 Juanfra Aldasoro Hello,

Thanks for writing. Unfortunately that can’t be made through the theme options. The Department template is a built in page template and WordPress give the order following the dates each element was created, however there are some PHP tweaks you can try in order to get the order from the “Attributes” box.

I’d recommend you to add the following code in your functions.php file:


 
function nice_deparment_order( $query ) {
    if ( ( $query->is_main_query() ) && ( is_tax( 'department' ) ) ){
             $query->set( 'orderby', 'menu_order' );
            $query->set( 'order', 'ASC' );
   }
}
 
//Hook the function
 
add_action( 'pre_get_posts', 'nice_deparment_order' );
 

Best,
Juan.

]]>
http://nicethemeswp.com/forums/topic/staff-order-with-department/#post-2798 <![CDATA[Reply To: Staff Order with Department]]> http://nicethemeswp.com/forums/topic/staff-order-with-department/#post-2798 Tue, 17 Dec 2013 21:08:13 +0000 Juanfra Aldasoro Please note that the

&&

should be &&

Best,
Juan.

]]>
http://nicethemeswp.com/forums/topic/staff-order-with-department/#post-2803 <![CDATA[Reply To: Staff Order with Department]]> http://nicethemeswp.com/forums/topic/staff-order-with-department/#post-2803 Tue, 17 Dec 2013 21:33:32 +0000 orlandpcs Hi,

I added that code into my functions.php file and now I cannot access the dashboard or my site.

This sign comes up: Parse error: syntax error, unexpected ‘;’ in C:\wamp\www\wp-content\themes\paeon\functions.php on line 14

How can I get back into wordpress to delete it?

]]>
http://nicethemeswp.com/forums/topic/staff-order-with-department/#post-2806 <![CDATA[Reply To: Staff Order with Department]]> http://nicethemeswp.com/forums/topic/staff-order-with-department/#post-2806 Tue, 17 Dec 2013 21:49:15 +0000 orlandpcs I am unable to log into my wordpress admin. How can this be fixed?

]]>
http://nicethemeswp.com/forums/topic/staff-order-with-department/#post-2807 <![CDATA[Reply To: Staff Order with Department]]> http://nicethemeswp.com/forums/topic/staff-order-with-department/#post-2807 Tue, 17 Dec 2013 21:52:48 +0000 Juanfra Aldasoro Hi,

Thanks for your response.

Did you see my last message stating the thing to look in the code?

If I’m not wrong you’re working locally right? You can go to C:\wamp\www\wp-content\themes\paeon\ and open the file functions.php with any text editor, like notepad. Then you’ll need to edit that change I’ve mentioned before.

Best,
Juan.

]]>
http://nicethemeswp.com/forums/topic/staff-order-with-department/#post-2809 <![CDATA[Reply To: Staff Order with Department]]> http://nicethemeswp.com/forums/topic/staff-order-with-department/#post-2809 Tue, 17 Dec 2013 21:55:39 +0000 orlandpcs great. thanks! So && replaces that entire line?

]]>
http://nicethemeswp.com/forums/topic/staff-order-with-department/#post-2810 <![CDATA[Reply To: Staff Order with Department]]> http://nicethemeswp.com/forums/topic/staff-order-with-department/#post-2810 Tue, 17 Dec 2013 21:57:49 +0000 Juanfra Aldasoro If you check the first code, you need to find

&&

And replace it with &&

The problem is that the code editor we’re using to show code is not replacing the && as it should, and is showing

&&

instead.

You know how it is when it comes to code. A simple comma breaks everything 😉

Best,
Juan.

]]>
http://nicethemeswp.com/forums/topic/staff-order-with-department/#post-2811 <![CDATA[Reply To: Staff Order with Department]]> http://nicethemeswp.com/forums/topic/staff-order-with-department/#post-2811 Tue, 17 Dec 2013 22:03:26 +0000 orlandpcs Awesome! Got it all fixed. Thanks for all your help!

Have a great day

]]>
http://nicethemeswp.com/forums/topic/staff-order-with-department/#post-2812 <![CDATA[Reply To: Staff Order with Department]]> http://nicethemeswp.com/forums/topic/staff-order-with-department/#post-2812 Tue, 17 Dec 2013 22:19:32 +0000 Juanfra Aldasoro Great 🙂

Have a nice day you too!

Best,
Juan.

]]>