malquem
Ответы в темах
-
Форум: Проблемы и решения
Тема: Не пойму где удалить заголовок43 строка удаляет логотип.
Я тут задаю вопрос раз в год. Поймите, куда-то сунули этот код и херь поймешь куда…Форум: Проблемы и решения
Тема: Не пойму где удалить заголовокЕсть еще вот такой код:
/* * Let WordPress manage the document title. * By adding theme support, we declare that this theme does not use a * hard-coded <title> tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support( 'title-tag' );
Форум: Проблемы и решения
Тема: Не пойму где удалить заголовокidolcorp: content-single.php (page-templates/content-single.php)
Кэш чистил, а еще зашел с другого браузер — ничего не меняется
УДАЛИЛ:<?php if ( is_single() ) :
the_title( ‘<h2 class=»entry-title»>’, ‘</h2>’ );
else :
the_title( ‘<h2 class=»entry-title»>‘, ‘</h2>’ );
endif;
?>- Ответ изменён 8 лет, 9 месяцев назад пользователем malquem.
Форум: Проблемы и решения
Тема: Не пойму где удалить заголовокСпасибо за подробный ответ, но после удаления:
13 <?php if ( is_single() ) : 14 the_title( '<h2 class="entry-title">', '</h2>' ); 15 else : 16 the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' ); 17 endif; 18 ?>
На сайте ничего не меняется =(
Форум: Проблемы и решения
Тема: Не пойму где удалить заголовокКак удалить заголовки H1 и H2? На каждой странице есть эти заголовки поста и я не знаю как удалить так, чтобы заголовки не выводились на странице.
Форум: Проблемы и решения
Тема: Не пойму где удалить заголовокИзвините, не догодался сразу написать
Форум: Проблемы и решения
Тема: Не пойму где удалить заголовокfunctions.php
<?php /** * Idolcorp functions and definitions * * * Set up the theme and provides some helper functions, which are used in the * theme as custom template tags. Others are attached to action and filter * hooks in WordPress to change core functionality. * * * * * When using a child theme you can override certain functions (those wrapped * in a function_exists() call) by defining them first in your child theme's * functions.php file. The child theme's functions.php file is included before * the parent theme's file, so the child theme functions would be used. * * @link http://codex.wordpress.org/Theme_Development * @link http://codex.wordpress.org/Child_Themes * * * * Functions that are not pluggable (not wrapped in function_exists()) are * instead attached to a filter or action hook. * * * For more information on hooks, actions, and filters, * @link http://codex.wordpress.org/Plugin_API * * * @package Idolcorp * @since Idolcorp 1.0 */ if ( ! function_exists( 'idolcorp_setup' ) ) : /** * Idolcorp setup. * * Set up theme defaults and registers support for various WordPress features. * * Note that this function is hooked into the after_setup_theme hook, which * runs before the init hook. The init hook is too late for some features, such * as indicating support post thumbnails. * * @since Idolcorp 1.0 */ function idolcorp_setup() { /* * Make Idolcorp for translation. * * Translations can be added to the /languages/ directory. * If you're building a theme based on Idolcorp, use a find and * replace to change 'idolcorp' to the name of your theme in all * template files. */ load_theme_textdomain( 'idolcorp', get_template_directory() . '/languages' ); // Add RSS feed links to <head> for posts and comments. add_theme_support( 'automatic-feed-links' ); /* * Let WordPress manage the document title. * By adding theme support, we declare that this theme does not use a * hard-coded <title> tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support( 'title-tag' ); add_theme_support( 'jetpack-responsive-videos' ); // Enable support for Post Thumbnails, and declare two sizes. add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 760, 354, true ); add_image_size( 'idolcorp-full-width', 1350, 434, true ); add_image_size( 'idolcorp-ourfeatures-thumb', 263, 165, true ); add_image_size( 'idolcorp-mediumblog-thumb', 288, 244, true ); // This theme uses wp_nav_menu() in two locations. register_nav_menus( array( 'primary' => __( 'Top primary menu', 'idolcorp' ), 'discalimer' => __( 'Disclaimer Menu', 'idolcorp' ), ) ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption' ) ); /* * Enable support for Post Formats. * See http://codex.wordpress.org/Post_Formats */ add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'audio', 'quote', 'link', 'gallery', ) ); /** * Filter the arguments used when adding 'custom-background' support in Twenty Sixteen. * * @since Idolcorp 1.0 * * @param array $args { * An array of custom-background support arguments. * * @type string $default-color Default color of the background. * } */ add_theme_support( 'custom-background', array('default-color' =>'#ffffff' ) ); // This theme uses its own gallery styles. add_filter( 'use_default_gallery_style', '__return_false' ); /* * This theme styles the visual editor to resemble the theme style, * specifically font, colors, icons, and column width. */ add_editor_style( array( 'editor-style.css', idolcorp_fonts_url() ) ); /* * Theme Logo is a theme feature, first introduced in Version 4.5. This feature allows themes to add custom logos. * */ /* * Enable support for custom logo. * * @Idolcorp 1.0.3 */ add_theme_support( 'custom-logo', array( 'height' => 175, 'width' => 400, 'flex-width' => true, )); } endif; // idolcorp_setup add_action( 'after_setup_theme', 'idolcorp_setup' ); /** * Set the content width in pixels, based on the theme's design and stylesheet. * * Priority 0 to make it available to lower priority callbacks. * * @global int $content_width * * @since Idolcorp 1.0 * * @return void */ function idolcorp_content_width() { $GLOBALS['content_width'] = apply_filters( 'idolcorp_content_width', 915 ); } add_action( 'after_setup_theme', 'idolcorp_content_width', 0 ); // Load idolcorp custom function file. require get_template_directory() . '/inc/idolcorp-functions.php'; // Custom functions that act independently of the theme templates. require get_template_directory() . '/inc/extras.php'; // Implement Custom Header features. require get_template_directory() . '/inc/custom-header.php'; // Custom template tags for this theme. require get_template_directory() . '/inc/template-tags.php'; // Load idolcorp custom contact info widget. require get_template_directory() .'/inc/widget/idolcorp_contactinfo_widgets.php'; // Call to Action widget // Load idolcorp custom widget area and related functions. require get_template_directory() . '/inc/idolcorp-widget-area.php'; // Add Custom WordPress Customizer classes require_once get_template_directory() . '/themeidol-customizer/class-wp-custom-customize-control.php'; // Add Custom WordPress Sanitize functionality require_once get_template_directory() . '/themeidol-customizer/themidol-sanitize.php'; // Add Theme Customizer functionality. require get_template_directory() . '/themeidol-customizer/themeidol-customizer.php'; // Load Jetpack compatibility file. require get_template_directory() . '/inc/jetpack.php';
кастом хедер
<?php /** * Implement Custom Header functionality for Idolcorp * * * @package Idolcorp * @since Idolcorp 1.0 */ /** * Set up the WordPress core custom header settings. * * @since Idolcorp 1.0 * * @uses idolcorp_header_style() * @uses idolcorp_admin_header_style() * @uses idolcorp_admin_header_image() */ function idolcorp_custom_header_setup() { /** * Filter Idolcorp custom-header support arguments. * * @since Idolcorp 1.0 * * @param array $args { * An array of custom-header support arguments. * * @type bool $header_text Whether to display custom header text. Default false. * @type int $width Width in pixels of the custom header image. Default 1260. * @type int $height Height in pixels of the custom header image. Default 240. * @type bool $flex_height Whether to allow flexible-height header images. Default true. * @type string $admin_head_callback Callback function used to style the image displayed in * the Appearance > Header screen. * @type string $admin_preview_callback Callback function used to create the custom header markup in * the Appearance > Header screen. * } */ add_theme_support( 'custom-header', apply_filters( 'idolcorp_custom_header_args', array( 'default-text-color' => '000', 'width' => 1350, 'height' => 377, 'flex-height' => true, 'default-image' => get_template_directory_uri().'/images/best-theme.png', 'wp-head-callback' => 'idolcorp_header_style', 'admin-head-callback' => 'idolcorp_admin_header_style', 'admin-preview-callback' => 'idolcorp_admin_header_image', ) ) ); } add_action( 'after_setup_theme', 'idolcorp_custom_header_setup' ); if ( ! function_exists( 'idolcorp_header_style' ) ) : /** * Styles the header image and text displayed on the blog * * @see idolcorp_custom_header_setup(). * */ function idolcorp_header_style() { $text_color = get_header_textcolor(); // If no custom color for text is set, let's bail. if ( display_header_text() && $text_color === get_theme_support( 'custom-header', 'default-text-color' ) ) return; // If we get this far, we have custom styles. ?> <style type="text/css" id="idolcorp-header-css"> <?php // Has the text been hidden? if ( ! display_header_text() ) : ?> .site-title, .site-description { clip: rect(1px 1px 1px 1px); /* IE7 */ clip: rect(1px, 1px, 1px, 1px); position: absolute; } <?php // If the user has set a custom color for the text, use that. elseif ( $text_color != get_theme_support( 'custom-header', '#212e32' ) ) : ?> .site-title a, .site-description { color: #<?php echo esc_attr( $text_color ); ?>; } <?php endif; ?> </style> <?php } endif; // idolcorp_header_style if ( ! function_exists( 'idolcorp_admin_header_style' ) ) : /** * Style the header image displayed on the Appearance > Header screen. * * @see idolcorp_custom_header_setup() * * @since Idolcorp 1.0 */ function idolcorp_admin_header_style() { ?> <style type="text/css" id="idolcorp-admin-header-css"> .appearance_page_custom-header #headimg { background-color: #000; border: none; max-width: 1600px; min-height: 48px; } #headimg h1 { font-family: Lato, sans-serif; font-size: 18px; line-height: 48px; margin: 0 0 0 30px; } #headimg h1 a { color: #fff; text-decoration: none; } #headimg img { vertical-align: middle; } </style> <?php } endif; // idolcorp_admin_header_style if ( ! function_exists( 'idolcorp_admin_header_image' ) ) : /** * Create the custom header image markup displayed on the Appearance > Header screen. * * @see idolcorp_custom_header_setup() * * @since Idolcorp 1.0 */ function idolcorp_admin_header_image() { ?> <div id="headimg"> <?php if ( get_header_image() ) : ?> <img src="<?php header_image(); ?>" alt=""> <?php endif; ?> <h1 class="displaying-header-text"><a id="name"<?php echo sprintf( ' style="color:#%s;"', get_header_textcolor() ); ?> onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a></h1> </div> <?php } endif; // idolcorp_admin_header_image
Вот index.php
<?php /** * The main template file * * This is the most generic template file in a WordPress theme and one * of the two required files for a theme (the other being style.css). * It is used to display a page when nothing more specific matches a query, * e.g., it puts together the home page when no home.php file exists. * * @link http://codex.wordpress.org/Template_Hierarchy * * * @package Idolcorp * @since Idolcorp 1.0 */ get_header(); ?> <div id="main" class="site-main"> <div class="container"> <div class="row content-wrap"> <?php echo idolcorp_custom_layout_class_and_structure('primary');?> <div id="content" class="site-content" role="main"> <section id="articlemain" class="post" role="main"> <?php if ( have_posts() ) : // Start the Loop. while ( have_posts() ) : the_post(); /* * Include the post format-specific template for the content. If you want to * use this in a child theme, then include a file called called content-___.php * (where ___ is the post format) and that will be used instead. */ get_template_part( 'page-templates/content', get_post_format() ); endwhile; // Previous/next post navigation. idolcorp_paging_nav(); else : // If no content, include the "No posts found" template. get_template_part( 'page-templates/content', 'none' ); endif; ?> </section> </div> </div> <?php idolcorp_sidebar_layout(); ?> </div> </div><!-- .container --> </div><!-- #main --> </div><!-- Main div Close--> <?php get_footer();
Файл page-templates/content-aside.php
<?php /** * The template for displaying posts in the Aside post format * * @package Idolcorp * @since Idolcorp 1.0 */ wp_reset_postdata(); ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <header class="entry-header"> <?php if ( is_single() ) : the_title( '<h2 class="entry-title">', '</h2>' ); else : the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' ); endif; ?> <div class="entry-meta clearfix"> <?php idolcorp_header_entry_meta(); ?> <?php if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) : echo '<div class="fa-comments-o comments-link">'; comments_popup_link( __( 'Leave a comment', 'idolcorp' ), __( '1 Comment', 'idolcorp' ), __( '% Comments', 'idolcorp' ) ); echo '</div>'; endif; edit_post_link( __( 'Edit', 'idolcorp' ), '<div class="fa-pencil-square-o edit-link">', '</div>' ); ?> </div> </header> <div class="entry-content"> <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'idolcorp' ) ); ?> <?php wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'idolcorp' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) ); ?> </div><!-- .entry-content --> <?php idolcorp_entry_meta_tags();?> </article>
page.php
<?php /** * The template for displaying all pages * * This is the template that displays all pages by default. * Please note that this is the WordPress construct of pages and that * other 'pages' on your WordPress site will use a different template. * * * @package Idolcorp * @since Idolcorp 1.0 */ get_header(); ?> <div id="main" class="site-main"> <div class="container"> <div class="row content-wrap"> <?php echo idolcorp_custom_layout_class_and_structure('primary');?> <div id="content" class="page site-content"> <section id="articlemain" class="post" role="main"> <?php // Start the Loop. while ( have_posts() ) : the_post(); // Include the page content template. get_template_part( 'page-templates/content', 'page' ); // If comments are open or we have at least one comment, load up the comment template. if ( comments_open() || get_comments_number() ) { comments_template(); } endwhile; ?> </section> </div> </div> <?php idolcorp_sidebar_layout(); ?> </div> </div><!-- .container --> </div><!-- #main --> </div><!-- Main div Close--> <?php get_footer();
- Ответ изменён 8 лет, 9 месяцев назад пользователем malquem.
Форум: Проблемы и решения
Тема: Отправить комментарийПолучилось!))
СПАСИБО ЕЩЕ РАЗ))Форум: Проблемы и решения
Тема: Отправить комментарийНичего не меняется((( я уже 3 день ломаю голову(
$comments_args = array( 'fields' => apply_filters( 'comment_form_default_fields', $new_fields ), 'title_reply' => '', 'label_submit' => __( 'Post Comment' ), 'comment_field' => '<p><textarea id="comment" name="comment" class="single_post_comment" placeholder="Введите текст" aria-required="true"></textarea></p>' );
Все равно спасибо вам огромное
Форум: Проблемы и решения
Тема: Отправить комментарий$comments_args = array( — вот после этого?
$comments_args = array( 'fields' => apply_filters( 'comment_form_default_fields', $new_fields ), 'title_reply' => '', 'comment_field' => '<p><textarea id="comment" name="comment" class="single_post_comment" placeholder="Введите текст" aria-required="true"></textarea></p>' );
Форум: Проблемы и решения
Тема: Отправить комментарийАргументах это где? Просто я боюсь не туда вставить код..
Форум: Проблемы и решения
Тема: Отправить комментарийSeVlad, я вам ничего не предлагаю. Человек попросил ссылку на тему, а я ему скинул. В интернете полно бесплатных копии, если вы хотите в ознакомительных целях, конечно.
Форум: Проблемы и решения
Тема: Отправить комментарийЭто вывод до добавлении комментарии.
Я не могу изменить саму кнопку
http://i72.fastpic.ru/big/2015/0704/0e/ee74b3fa5496910073a2d115b8b2490e.pngФорум: Проблемы и решения
Тема: Отправить комментарийФорум: Проблемы и решения
Тема: Отправить комментарийНе помогло. Даже по фильтрам не ищет