Plugin Post-Type overwrites backend Menu Entry
-
Hi there, very nice plugin it is working good.
The only issue I have is I noticed when I activated the plugin it overwrites one of my other post type menus in the wordpress backend. When you look at the screenshots, notice “Page Sections” is gone (Timeline overwrites its place) after activation.
Before Plugin Activated: http://pbrd.co/1ttM00q
After Plugin Activated: http://pbrd.co/1ttM94b
At least “Page Sections” comes back when I deactivate, but to do updates I’d have to constantly deactivate and activate your plugin to gain access to these page sections.
Is there any code fix I could apply to one of the plugin files so that “Timeline” in the wordpress backend takes a different position in the menu order so it doesn’t overwrite an existing one?
Thanks for any help, your plugin is great!
-
Nevermind, I did some research and figured it out. In case anyone else has this problem, look for the file AhmetiWpTimelineFunction.php in the main plugins directory.
Look for this line of code:
add_menu_page( 'Ahmeti Wp Timeline', 'Timeline', 'edit_pages', 'ahmeti-wp-timeline/index.php', 'Ahmeti_Wp_Timeline_Index', plugins_url('ahmeti-wp-timeline/images/ahmeti-wp-timeline-icon.png') , 6);Change it to something like (this is what i did):
add_menu_page( 'Ahmeti Wp Timeline', 'Timeline', 'edit_pages', 'ahmeti-wp-timeline/index.php', 'Ahmeti_Wp_Timeline_Index', plugins_url('ahmeti-wp-timeline/images/ahmeti-wp-timeline-icon.png') , '7.6');Notice the single quotes and the decimal, doing a decimal helps to make sure two menu items do not use the same position and overwrite each other.
By the way, I edited that plugin file while the plugin was active through Plugin / Editor in the wordpress admin area. Make sure to then deactivate and then re-activate the plugin after making the code change, so wordpress picks up the new menu position.
Hi hyest,
Thank you your feedback. I fixed that bug in verison 4.0.
Thank you again,
Ahmet
The topic ‘Plugin Post-Type overwrites backend Menu Entry’ is closed to new replies.