<p>This did the trick:</p>

<pre><code> craft()-&gt;sections-&gt;reorderEntryTypes($entryTypeIds);
</code></pre>

<p>Where <code>$entryTypeIds</code> is an array with all the id's in the correct order</p>

CC BY-SA 3.0
2017-08-30T07:23:37.700Z
2017-08-30T07:23:37.700Z
Sander Van Keer
<p>I was wondering if there's a way to change the position of elements in an entry type structure. I want to change the positions of the elements when a user logs in, so I'll write it in a plugin.</p>

<p>Any Ideas?</p>

CC BY-SA 3.0
2017-08-30T06:54:48.463Z
are you talking about frontend displaying the elements in a different order or in the admin panel?
mrsmn
CC BY-SA 3.0
2017-08-30T07:11:22.920Z
Admin panel but I've found a solution
Sander Van Keer
CC BY-SA 3.0
2017-08-30T07:12:15.663Z
Feel free to post it here as an answer for future reference for other developers who might want to do the same thing.
mrsmn
<plugin-development><structure><position>
Change position of entry types in a structure
# Change position of entry types in a structure

(Asked by: username_0 on 2017-08-30)

I was wondering if there's a way to change the position of elements in an entry type structure. I want to change the positions of the elements when a user logs in, so I'll write it in a plugin.

Any Ideas?

**Tags:** plugin-development, structure, position

> **Comments:**
> **username_1**: are you talking about frontend displaying the elements in a different order or in the admin panel?  
> **username_0**: Admin panel but I've found a solution  
> **username_1**: Feel free to post it here as an answer for future reference for other developers who might want to do the same thing.  

---

## 1 answers

### Answer by username_0 on 2017-08-30. Score: 2

This did the trick:
 craft()->sections->reorderEntryTypes($entryTypeIds);

Where $entryTypeIds is an array with all the id's in the correct order


---

