• peterlunglum

    (@peterlunglum)


    Hi,

    I’m working on a wordpress theme and am making tweaks to php files. However, on some recent changes I made recently, I noticed when I am in my dashboard and making changes to things like descriptions or blog title and etc. , after clicking save on changes, I am getting a blank page.

    In my URL it simply says ” https://localhost/DW_WP_Themes/blog/wp-admin/options.php ” Can anybody explain to me what this problem entails? Obviously, something is probably wrong semantically or syntactically for this to happen, but I am wondering what this problem is about and what can help me rectify this.

Viewing 1 replies (of 1 total)
  • Thread Starter peterlunglum

    (@peterlunglum)

    Here is my functions php for reference :

    <?php
    
    define('THEMEROOT', get_stylesheet_directory_uri());
    define('IMAGES', THEMEROOT . '/images');
    
    if ( function_exists('register_sidebar') )
    register_sidebar();
    
    function arphabet_widgets_init(){
    register_sidebar(array(
    'top-menu' => __('Top Menu', 'PLUM_THEME-framework'),
    'main-menu' => __('Main Menu', 'PLUM_THEME-framework'),
    ));
    }
    add_action('widgets_init', 'arphabet_widgets_init');
    
    if (function_exists('register_sidebar')) {
    register_sidebar(
    array(
    'name' => __('Sidebar', 'PLUM_THEME-framework'),
    'id' => 'sidebar',
    'description' => __('The main sidebar area', 'PLUM_THEME-framework'),
    'before_widget' => '<div class="sidebar-widget">',
    'after_widget' => '</div> <!--end sidebar-widget-->',
    'before_title' => '<h4>',
    'after_title' => '</>',
    ));
    }
    
    if (function_exists('add_theme_support')) {
    
    	add_theme_support('post-formats', array('link', 'quote', 'gallery'));
    
    	add_theme_support('post-thumbnails', array('post'));
    
    }
    
    $wp_filetype = wp_check_filetype(basename($filename), null );
      $wp_upload_dir = wp_upload_dir();
      $attachment = array(
         'guid' => $wp_upload_dir['url'] . '/' . basename( $filename ),
         'post_mime_type' => $wp_filetype['type'],
         'post_title' => preg_replace('/\.[^.]+$/', '', basename($filename)),
         'post_content' => '',
         'post_status' => 'inherit'
      );
      $attach_id = wp_insert_attachment( $attachment, $filename, 37 );
      // you must first include the image.php file
      // for the function wp_generate_attachment_metadata() to work
      require_once(ABSPATH . 'wp-admin/includes/image.php');
      $attach_data = wp_generate_attachment_metadata( $attach_id, $filename );
      wp_update_attachment_metadata( $attach_id, $attach_data );
      add_post_meta($post_id, '_thumbnail_id', $attach_id); 
    
    function plum_comments($comment, $args, $depth)  {
    
    	$GLOBALS['comment'] = $comment;
    
    	if (get_comment_type() == 'pingback' || get_comment_type() == 'trackback') : ?>
    
        trackbacks
    
    <?php elseif (get_comment_type() == 'comment') : ?>
    
    	comment
    
    	<?php endif; 
    
    }
    
     ?>
Viewing 1 replies (of 1 total)
  • The topic ‘options php’ is closed to new replies.