クラウドテンプレート様の「http://c-tpl.com/rwp_261.php」こちらのテーマを使用し、WordPressサイトを構築しています。
下層ページ構築のためページビルダーのプラグインをインストールしたのですが、どのプラグインも起動する事ができませんでした。
(Beaver Builder、Page Builder by SiteOrigin、Elementor Page Builder、Page Builder by MotoPressを試しました)
もし、functions.phpに記載するphp等でプラグインを制限するものがあれば解除したいのでご教授頂けば幸いです。
記載されているfunctions.phpは以下になります。
Beaver Builderですと編集用のポップアップ画面が出てこない、Page Builder by SiteOriginとElementor Page Builderの場合は何かしらの原因で表示できませんのような画面に、Page Builder by MotoPressの場合は読み込み中画面から遷移しません。
※デフォルトのテーマに戻すと起動する事ができるので、テーマの問題かと思われます。
lang
1<?php 2remove_action('wp_head', 'wp_generator'); 3 4 5/* Register navigation 6/*---------------------------------------------------------*/ 7register_nav_menus( array( 8 'primary' => __('Main Navigation', 'theme261_rwd'), 9 )); 10 11register_nav_menus( array( 12 'footer' => __('Footer Navigation', 'theme261_rwd'), 13 )); 14 15 16/* Register sidebars 17/*---------------------------------------------------------*/ 18register_sidebar(array( 19 'name' => __( 'sidebar' ), 20 'before_widget' => '<section id="%1$s" class="widget %2$s">', 21 'after_widget' => '</section>', 22 'before_title' => '<h3><span>', 23 'after_title' => '</span></h3>', 24 )); 25 26add_filter( 'wp_list_categories', 'theme261_rwd_list_categories', 10, 2 ); 27function theme261_rwd_list_categories( $output, $args ) { 28 $output = preg_replace('/</a>\s*((\d+))/',' ($1)</a>',$output); 29 return $output; 30} 31 32add_filter( 'get_archives_link', 'theme261_rwd_archives_link' ); 33function theme261_rwd_archives_link( $output ) { 34 $output = preg_replace('/</a>\s*( )((\d+))/',' ($2)</a>',$output); 35 return $output; 36} 37 38 39/* custom walker for the navigation 40/*-------------------------------------------*/ 41class description_walker extends Walker_Nav_Menu 42{ 43 function start_el(&$output, $item, $depth = 0, $args = array(), $id = 0) 44 { 45 global $wp_query; 46 $indent = ( $depth ) ? str_repeat( "\t", $depth ) : ''; 47 48 $class_names = $value = ''; 49 50 $classes = empty( $item->classes ) ? array() : (array) $item->classes; 51 52 $class_names = join( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item ) ); 53 $class_names = ' class="'. esc_attr( $class_names ) . '"'; 54 55 $output .= $indent . '<li id="menu-item-'. $item->ID . '"' . $value . $class_names .'>'; 56 57 $attributes = ! empty( $item->attr_title ) ? ' title="' . esc_attr( $item->attr_title ) .'"' : ''; 58 $attributes .= ! empty( $item->target ) ? ' target="' . esc_attr( $item->target ) .'"' : ''; 59 $attributes .= ! empty( $item->xfn ) ? ' rel="' . esc_attr( $item->xfn ) .'"' : ''; 60 $attributes .= ! empty( $item->url ) ? ' href="' . esc_attr( $item->url ) .'"' : ''; 61 62 $prepend = '<strong>'; 63 $append = '</strong>'; 64 $description = ! empty( $item->description ) ? '<span>'.esc_attr( $item->description ).'</span>' : ''; 65 66 if($depth != 0) 67 { 68 $description = $append = $prepend = ""; 69 } 70 71 $item_output = $args->before; 72 $item_output .= '<a'. $attributes .'>'; 73 $item_output .= $args->link_before .$prepend.apply_filters( 'the_title', $item->title, $item->ID ).$append; 74 $item_output .= $description.$args->link_after; 75 $item_output .= '</a>'; 76 $item_output .= $args->after; 77 78 $output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args ); 79 } 80} 81 82 83/* This is all for compatibility with versions of WordPress prior to 3.4. 84/*---------------------------------------------------------*/ 85define( 'NO_HEADER_TEXT', true ); 86define( 'HEADER_TEXTCOLOR', true ); 87define('HEADER_IMAGE', '%s/images/mainImg.jpg'); 88define('HEADER_IMAGE_WIDTH', 2560); 89define('HEADER_IMAGE_HEIGHT', 1056); 90add_theme_support('custom-header'); 91if (!function_exists('admin_header_style')) : 92function admin_header_style() { } 93endif; 94 95if (!isset( $content_width ))$content_width = 625; 96 97 98/* This theme uses post thumbnails 99/*---------------------------------------------------------*/ 100add_theme_support( 'post-thumbnails' ); 101add_image_size('size1',240,160); 102 103 104/* Custom Excerpt "more" Link 105/*---------------------------------------------------------*/ 106function change_excerpt_more($post) { 107 return ' ...'; 108} 109add_filter('excerpt_more', 'change_excerpt_more'); 110 111 112/* Load up the theme options 113/*---------------------------------------------------------*/ 114require( dirname( __FILE__ ) . '/inc/theme-options.php' ); 115 116 117/* Add admin CSS 118/*---------------------------------------------------------*/ 119function theme261_rwd_admin_css(){ 120 $adminCssPath = get_template_directory_uri().'/cTpl_admin.css'; 121 wp_enqueue_style( 'theme', $adminCssPath , false, '2012'); 122} 123add_action('admin_head', 'theme261_rwd_admin_css', 11); 124 125 126/* Display navigation to next/previous pages when applicable 127/*---------------------------------------------------------*/ 128function theme261_rwd_content_nav( $nav_id ) { 129 global $wp_query; 130 if ( $wp_query->max_num_pages > 1 ) : ?> 131 <div class="pagenav"> 132 <div class="prev"><?php previous_posts_link('« 前のページ'); ?></div> 133 <div class="next"><?php next_posts_link('次のページ »'); ?></div> 134 </div> 135 <?php endif; 136 wp_reset_query(); 137} 138 139 140/* Frontpage excerpt length 141/*---------------------------------------------------------*/ 142function custom_excerpt_length( $length ) { 143 return 110; 144} 145add_filter( 'excerpt_length', 'custom_excerpt_length', 999 ); 146 147 148?>
あなたの回答
tips
プレビュー