View Full Version : own WordPress plugin

11-11-2012, 08:56 AM
Hi. I need to make my own plugin for WordPress. This plugin will work like this:

U made post in Admin panel of WordPress. And u need to tell users that this is an important post. So u just select "important" option in post editor and a small ribbon with some text ill appear on the top of this post. like this:


Is there any existing plugin? If not please help me do this, because I never made any wordpress plugin..... And I need it as soon as I can.

THX very much :)

11-11-2012, 11:54 AM
You might want to consider a different design to add such a ribbon, it's blocking the "important" text. :rolleyes:

The idea shouldn't be hard, in theory. You could add a column in your database table for posts labels "important", or similar. Also, it would be much easier to edit to the existing post-display and admin posting pages, instead of making something independent. More importantly, do you know how to understand and edit PHP, and your database? That would be the real hurdle in this case.

11-11-2012, 01:35 PM
I do not know wich table it is in database, but I can search and edit it. I do not know where the PHP for post editor is but I can search for it too :D So I think I can do it. If nope, I'll tell you :). But I don't know one thing. How to use WordPress's functions to get "important" value from database :/

Thx :)

11-11-2012, 02:07 PM
You should be able to find a part of file that connects to the database to get the posts for display, and at that part you could add to the database query to find which posts are important. Combine with a little HTML and CSS, and you can have ribbon on these posts.

Similarly you would find the connecting to the database in the posts editor, and allow the new "important" value to be updated from this form if it is submitted.

If you get stuck, then post related part of codes so we might spy the parts to change!