WordPress.org

Ready to get started?Download WordPress

Forums

Team Rosters
[resolved] Fatal error: Cannot redeclare my_get_posts() (3 posts)

  1. tutankhamun
    Member
    Posted 1 year ago #

    Hey everyone!

    I can't seem to get my plugin activated because this is all I get. "Plugin could not be activated because it triggered a fatal error : Fatal error: Cannot redeclare my_get_posts() (previously declared in ..../..../functions.php)". Is there a workaround this issue?

    http://wordpress.org/extend/plugins/team-rosters/

  2. Mark O'Donnell
    Member
    Plugin Author

    Posted 1 year ago #

    hi tutanhamun,
    That's my bad. If you search for my_get_posts in mstw-team-rosters.php, you will find it on lines 73 and 75. If you just change those lines to


    add_filter( 'pre_get_posts', 'mstw_tr_get_posts' );

    function mstw_tr_get_posts( $query ) {

    you should be good to go. I will add this fix to the next release, which should be out this week pending fixes to a couple of featured image/thumbnail issues.

    Sorry for the inconvenience.

    -Mark

  3. Mark O'Donnell
    Member
    Plugin Author

    Posted 1 year ago #

    This fix will be included in the next release, which will hopefully be next week.

    [ Signature moderated. ]

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic