フォーラムへの返信

13件の返信を表示中 - 1 - 13件目 (全13件中)
  • トピック投稿者 tkyssmn0321

    (@tkyssmn0321)

    php-webさま

    ありがとうございます。
    私もいろいろとやってみたのですが、やはりダメでした。
    php-webさんがおっしゃられた方法ですと、
    テーマに使われているメニューが動かなくなります。

    プラグインの開発者さんが英語みたいですが、がんばって質問してみます。

    トピック投稿者 tkyssmn0321

    (@tkyssmn0321)

    直接送らせていただきました。

    よろしくお願いいたします。

    トピック投稿者 tkyssmn0321

    (@tkyssmn0321)

    php-webさま

    以上でよかったでしょうか?
    よろしくお願いします。

    トピック投稿者 tkyssmn0321

    (@tkyssmn0321)

    unoslider.php

    $symlink_hack = __FILE__;
    if ( isset( $mu_plugin ) ) {
    	$symlink_hack = $mu_plugin;
    }
    if ( isset( $network_plugin ) ) {
    	$symlink_hack = $network_plugin;
    }
    if ( isset( $plugin ) ) {
    	$symlink_hack = $plugin;
    }
    
    define('UNOSLIDER_PATH', plugin_dir_url($symlink_hack));
    define('UNOSLIDER_BASE', dirname(__FILE__));
    define('UNOSLIDER_SLUG', basename(dirname(__FILE__)));
    define('UNOSLIDER_NAME', 'UnoSlider');
    define('UNOSLIDER_VERSION', '1.3');
    if(isset($wp_version)) define('WP_VERSION', $wp_version);
    define('UNOSLIDER_ENV', 'production');
    
    require_once 'application/bootstrap.php';
    
    $app = new Unoslider;
    
    register_activation_hook($symlink_hack, array('Unoslider', 'activate'));
    register_deactivation_hook($symlink_hack, array('Unoslider', 'deactivate'));
    register_uninstall_hook($symlink_hack, array('Unoslider', 'uninstall'));
    
    $app->run();
    トピック投稿者 tkyssmn0321

    (@tkyssmn0321)

    module_loop.php

    <?php if (have_posts()) :?>
    <div class="post">
    <?php while (have_posts()) : the_post(); ?>
    
    	<article id="post-<?php the_ID(); ?>">
      	<header>
        	<p><time datetime="<?php the_time('Y-m-d')?>"><?php the_time("Y/n/j"); ?></time> <a>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><span><?php the_title(); ?></span></a>
        </header>
      </article>
    
    <?php endwhile; ?>
    </div>
    <?php else: ?>
    	<p><?php _e('Sorry, no posts matched your criteria.'); ?>
    <?php endif; ?>
    トピック投稿者 tkyssmn0321

    (@tkyssmn0321)

    以上でOKでしょうか??

    トピック投稿者 tkyssmn0321

    (@tkyssmn0321)

    front-page.php

    <?php get_header();
    $header_image = get_header_image();
    if ($header_image):?>
      <div id="mainImg"><img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="<?php bloginfo( 'description' ); ?>"></div><?php endif;?>
    
    <div id="wrapper">
    <div id="content">
    <section>
        <?php query_posts($query_string . "showposts=3&cat=-" .(get_category_by_slug('info')->term_id)); ?>
      	<?php if (have_posts()) :?>
        <h2 class="toppage"><span>新着情報</span></h2>
    		<div class="thumbWrap">
    			<ul class="thumb">
      	 		<?php while (have_posts()) : the_post(); ?>
    
    <li>
        		<?php echo get_the_post_thumbnail($post->ID, 'size1'); ?>
          	<?php the_excerpt();?>
            <h3><a>"><span><?php the_title(); ?></span></a></h3>
        		<?php endwhile; ?>
    
    	  </div>
    		<?php else: ?>
     		<?php endif; ?>
    </section>
    
    <?php get_footer(); ?></li>
    トピック投稿者 tkyssmn0321

    (@tkyssmn0321)

    sidebar.php

    <aside id="sidebar">
    <?php cTpl_009_rwd_pink_sidebarBanner(); ?>
    
      <?php $posts = get_posts('category_name=info&numberposts=5');?>
      <?php if ($posts):?>
      <section class="widgetInfo">
      <div class="newsTitle">
    		<h3 class="title"><span>お知らせ</span></h3>
        <p><a>category/info/">一覧</a>
      </div>
    	<div class="news">
    	  <?php foreach($posts as $post) : setup_postdata($post)?>
    		<p><a>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><time datetime="<?php the_time('Y-m-d')?>"><?php the_time("Y/n/j"); ?></time><span><?php the_title(); ?></span></a>
    		<?php endforeach;?>
    	</div>
      </section>
      <?php endif;?>
    
    	<?php dynamic_sidebar('sidebar'); ?>
    
    </aside>
    トピック投稿者 tkyssmn0321

    (@tkyssmn0321)

    index.php

    <?php get_header(); ?>
    <div id="content">
    	<section>
    	<?php if (is_search()) : ?>
    		<h2 class="title first"><span>『<?php the_search_query(); ?>』の検索結果<?php if (get_query_var('paged')) echo ' | '. get_query_var('paged') .'ページ目'; ?></span></h2>
    	<?php endif; ?>
    	<?php if (have_posts()) :?>
    <div class="news post">
    <?php while (have_posts()) : the_post(); ?>
    
    	<article id="post-<?php the_ID(); ?>">
      	<header>
        	<p><a>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><span><?php the_title(); ?></span></a>
        </header>
      </article>
    
    <?php endwhile; ?>
    </div>
    <?php else: ?>
    	<p><?php _e('Sorry, no posts matched your criteria.'); ?>
    <?php endif; ?>
    
      <?php cTpl_009_rwd_pink_content_nav( 'nav-below' ); ?>
    
    <?php get_footer(); ?>
    トピック投稿者 tkyssmn0321

    (@tkyssmn0321)

    footer.php

    </div><!-- / content -->
      <?php get_sidebar(); ?>
    
    </div>
    <!-- / wrapper -->
    
    <footer id="footer">
      <div class="inner">
    	<?php $footerNav = wp_nav_menu( array( 'container' => '', 'items_wrap' => '
    <ul>%3$s</ul>
    ','theme_location'=>'footer') );?>
      </div>
    </footer>
    <!-- / footer -->
    
    <p id="copyright">Copyright © <?php echo date('Y'); ?> <?php bloginfo('name'); ?> All rights Reserved.
    
    <?php wp_footer(); ?>
    </body>
    </html>
    トピック投稿者 tkyssmn0321

    (@tkyssmn0321)

    archive.php

    <?php get_header(); ?>
    <div id="wrapper">
    
      <div id="content">
    	<section>
    
    	<?php if ( is_category() ) : ?>
    	<h2 class="title first"><span><?php single_cat_title(); ?></span></h2>
    	<?php elseif (is_day()) : ?>
    	<h2 class="title first"><span><?php the_time('Y/m/d'); ?></span></h2>
    	<?php elseif (is_month()) : ?>
    	<h2 class="title first"><span><?php the_time('Y/m'); ?></span></h2>
    	<?php elseif (is_year()) : ?>
    	<h2 class="title first"><span><?php the_time('Y'); ?></span></h2>
    	<?php elseif (isset($_GET['paged']) && !empty($_GET['paged'])) : ?>
    	<h2 class="title first"><span>Blog Archives</span></h2>
    	<?php endif; ?>
    
    	<?php get_template_part('module_loop'); ?>
    
    	</section>
      <?php cTpl_009_rwd_pink_content_nav('nav-below'); ?>
    
    <?php get_footer(); ?>
    トピック投稿者 tkyssmn0321

    (@tkyssmn0321)

    functions.php

    <?php
    remove_action('wp_head', 'wp_generator');
    
    /*	Register navigation
    /*---------------------------------------------------------*/
    register_nav_menus( array(
    	'primary' => __('Main Navigation', 'cTpl_009_rwd_pink'),
    	));
    
    register_nav_menus( array(
    	'sub' => __('Sub Navigation', 'cTpl_009_rwd_pink'),
    	));
    
    register_nav_menus( array(
    	'footer' => __('Footer Navigation', 'cTpl_009_rwd_pink'),
    	));
    
    /*	Register sidebars
    /*---------------------------------------------------------*/
    register_sidebar(array(
    	'name' => __( 'sidebar' ),
      'before_widget' => '<section id="%1$s" class="widget %2$s">',
      'after_widget' => '</section>',
      'before_title' => '<h3><span>',
      'after_title' => '</span></h3>',
    	));
    
    add_filter( 'wp_list_categories', 'cTpl_009_rwd_pink_list_categories', 10, 2 );
    function cTpl_009_rwd_pink_list_categories( $output, $args ) {
      $output = preg_replace('/<\/a>\s*\((\d+)\)/',' ($1)',$output);
      return $output;
    }
    
    add_filter( 'get_archives_link', 'cTpl_009_rwd_pink_archives_link' );
    function cTpl_009_rwd_pink_archives_link( $output ) {
      $output = preg_replace('/<\/a>\s*( )\((\d+)\)/',' ($2)',$output);
      return $output;
    }
    
    /*	custom walker for the navigation
    /*-------------------------------------------*/
    class description_walker extends Walker_Nav_Menu
    {
          function start_el(&$output, $item, $depth, $args)
          {
               global $wp_query;
               $indent = ( $depth ) ? str_repeat( "\t", $depth ) : '';
    
               $class_names = $value = '';
    
               $classes = empty( $item->classes ) ? array() : (array) $item->classes;
    
               $class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item ) );
               $class_names = ' class="'. esc_attr( $class_names ) . '"';
    
               $output .= $indent . '<li id="menu-item-'. $item->ID . '"' . $value . $class_names .'>';
    
               $attributes  = ! empty( $item->attr_title ) ? ' title="'  . esc_attr( $item->attr_title ) .'"' : '';
               $attributes .= ! empty( $item->target )     ? ' target="' . esc_attr( $item->target     ) .'"' : '';
               $attributes .= ! empty( $item->xfn )        ? ' rel="'    . esc_attr( $item->xfn        ) .'"' : '';
               $attributes .= ! empty( $item->url )        ? ' href="'   . esc_attr( $item->url        ) .'"' : '';
    
               $prepend = '<strong>';
               $append = '</strong>';
               $description  = ! empty( $item->description ) ? '<span>'.esc_attr( $item->description ).'</span>' : '';
    
               if($depth != 0)
               {
                         $description = $append = $prepend = "";
               }
    
                $item_output = $args->before;
                $item_output .= '<a'. $attributes .'>';
                $item_output .= $args->link_before .$prepend.apply_filters( 'the_title', $item->title, $item->ID ).$append;
                $item_output .= $description.$args->link_after;
                $item_output .= '';
                $item_output .= $args->after;
    
                $output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args );
                }
    }
    
    /*	This is all for compatibility with versions of WordPress prior to 3.4.
    /*---------------------------------------------------------*/
    define( 'NO_HEADER_TEXT', true );
    define( 'HEADER_TEXTCOLOR', true );
    define('HEADER_IMAGE', '%s/images/banners/mainImage.jpg');
    define('HEADER_IMAGE_WIDTH', 960);
    define('HEADER_IMAGE_HEIGHT', 350);
    add_theme_support('custom-header');
    if (!function_exists('admin_header_style')) :
    function admin_header_style() { }
    endif;
    
    if (!isset( $content_width ))$content_width = 625;
    
    /*	This theme uses post thumbnails
    /*---------------------------------------------------------*/
    add_theme_support( 'post-thumbnails' );
    add_image_size('size1',220,100);
    
    /*	Custom Excerpt "more" Link
    /*---------------------------------------------------------*/
    function change_excerpt_more($post) {
      return ' ...';
    }
    add_filter('excerpt_more', 'change_excerpt_more');
    
    /*	Load up the theme options
    /*---------------------------------------------------------*/
    require( dirname( __FILE__ ) . '/inc/theme-options.php' );
    
    /*	Add admin CSS
    /*---------------------------------------------------------*/
    function cTpl_009_rwd_pink_admin_css(){
    	$adminCssPath = get_template_directory_uri().'/cTpl_admin.css';
    	wp_enqueue_style( 'theme', $adminCssPath , false, '2012');
    }
    add_action('admin_head', 'cTpl_009_rwd_pink_admin_css', 11);
    
    /*	Display navigation to next/previous pages when applicable
    /*---------------------------------------------------------*/
    function cTpl_009_rwd_pink_content_nav( $nav_id ) {
    	global $wp_query;
    	if ( $wp_query->max_num_pages > 1 ) : ?>
    		<div class="pagenav">
    			<div class="prev"><?php previous_posts_link('« 前のページ'); ?></div>
    			<div class="next"><?php next_posts_link('次のページ »'); ?></div>
    		</div>
    	<?php endif;
    	wp_reset_query();
    } 
    
    ?>
    トピック投稿者 tkyssmn0321

    (@tkyssmn0321)

    php-webさま

    header.php

    <!DOCTYPE html>
    <html <?php language_attributes(); ?>>
    <head>
    <meta charset="<?php bloginfo( 'charset' ); ?>">
    <meta name="viewport" content="width=device-width, user-scalable=yes, maximum-scale=1.0, minimum-scale=1.0">
    <meta name="description" content="<?php echo trim(wp_title('', false)); if(wp_title('', false)) { echo ' - '; } bloginfo('description'); ?>">
    <title><?php global $page, $paged;
      wp_title( '|', true, 'right' );
    	bloginfo( 'name' );
    	$site_description = get_bloginfo( 'description', 'display' );
    	if ( $site_description && ( is_home() || is_front_page() ) )
    		echo " | $site_description";
    	if ( $paged >= 2 || $page >= 2 )
    		echo ' | ' . sprintf( __( 'Page %s', 'cTpl_009_rwd_pink' ), max( $paged, $page ) );
    	?></title>
    <link rel="profile" href="http://gmpg.org/xfn/11">
    <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>">
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
    <!--[if lt IE 9]>
    <script src="<?php bloginfo('template_url'); ?>/js/html5.js"></script>
    <script src="<?php bloginfo('template_url'); ?>/js/css3-mediaqueries.js"></script>
    <![endif]-->
    <?php wp_deregister_script('jquery'); wp_head(); ?>
    <script src="<?php bloginfo('template_url'); ?>/js/jquery1.4.4.min.js"></script>
    <script src="<?php bloginfo('template_url'); ?>/js/script.js"></script>
    </head>
    <body>
    <header id="header" role="banner">
    
      <div class="bg">
      	<div class="inner">
    			<h1><?php bloginfo( 'description' ); ?></h1>
          <?php cTpl_009_rwd_pink_print_contactInfo();?>
        </div>
      </div>
    
    	<div class="inner">
      	<h2><a>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php cTpl_009_rwd_pink_print_Logo();?></a></h2>
    
        <?php $subNav = wp_nav_menu( array( 'container' => '', 'items_wrap' => '
    <ul>%3$s</ul>
    ','theme_location'=>'sub') );?>
    	</div>
    </header>
    
      <nav id="mainNav">
        <div class="inner">
        <a><span>MENU</span></a>
    		<div class="panel">
        <?php $topNav = wp_nav_menu( array( 'container' => '', 'items_wrap' => '
    <ul>%3$s</ul>
    ','theme_location'=>'primary','walker' => new description_walker()) );?>
        </div>
        </div>
      </nav>
13件の返信を表示中 - 1 - 13件目 (全13件中)