WordPress.org

Forums

[resolved] [Plugin: Custom Post Type UI] Error preventing sidebar display (2 posts)

  1. Nick5a1
    Member
    Posted 5 years ago #

    Hi,

    Custom Post Type UI is causing the following error and preventing my sidebar.php from showing:
    Fatal error: Cannot redeclare curpageurl() (previously declared in mydomain.com/wp-content/plugins/custom-post-type-ui/custom-post-type-ui.php:1319) in mydomain.com/content/wp-content/themes/0286/sidebar.php on line 35

    Line 35 of my sidebar.php is:
    } echo curPageURL(); in the function:

    function curPageURL() {
     $pageURL = 'http';
     if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
     $pageURL .= "://";
     if ($_SERVER["SERVER_PORT"] != "80") {
      $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
     } else {
      $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
     }
     return $pageURL;
    } echo curPageURL();

    Line 1319 of custom-post-type-ui.php is:
    $pageURL = 'http'; in the function:

    function curPageURL() {
    	$pageURL = 'http';
    	if (!empty($_SERVER['HTTPS'])) {$pageURL .= "s";}
    		$pageURL .= "://";
    	if ($_SERVER["SERVER_PORT"] != "80") {
    		$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
    	} else {
    		$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
    	}
    	return $pageURL;
    }

    Anyone have any ideas what is happening?

  2. Nick5a1
    Member
    Posted 5 years ago #

    Solved the problem.

Topic Closed

This topic has been closed to new replies.

About this Topic