Odpowiedź forum utworzona

Viewing 10 replies - 1 through 10 (of 10 total)
  • Twórca wątku mzcv

    (@mzcv)

    Paweł, proszę Cię bardzo daj znać jak to zmienić? Czy akurat ta wersja motywu z linku nie jest edytowalna i trzeba znaleźć ten motyw gdzie indziej?

    Twórca wątku mzcv

    (@mzcv)

    Strzał w dziesiątkę Nikodemsky! Dzięki wielkie.

    Twórca wątku mzcv

    (@mzcv)

    Mam już zainstalowaną wtyczkę Polylang która pewne elementy jak np. nazwy zakładek menu, czy treści fajnie tłumaczy, natomiast jeśli chodzi o np. główne hasło strony (slogan) który jest tylko w jednym polu ustawień motywu wpisany to nie mam możliwości tego przetłumaczenia.

    Twórca wątku mzcv

    (@mzcv)

    W kokpicie w zakładce 'Wygląd’ a następnie 'Personalizacja’ sprawdzałem. Część tekstu można wstawić jako widget który wyświetla się w określonej wersji językowej strony ale chodzi o tą część która jest uzupełniona w polach gdzie jest możliwe do wpisania tylko jedna wersja.

    Twórca wątku mzcv

    (@mzcv)

    Panowie i może też panie, bardzo proszę o pomoc w powyższym temacie. 🙁

    Twórca wątku mzcv

    (@mzcv)

    Także proszę o informację gdzie i jak te 'entery’ wstawić w kodzie.

    Twórca wątku mzcv

    (@mzcv)

    Dzięki 'mojeprogramy.com’ za zainteresowaniem tematem. Mam już fragment kodu funkcji comments_template jednak nie wiem gdzie to zmienić:

    function comments_template( $file = '/comments.php', $separate_comments = false ) {
    	global $wp_query, $withcomments, $post, $wpdb, $id, $comment, $user_login, $user_ID, $user_identity, $overridden_cpage;
    
    	if ( !(is_single() || is_page() || $withcomments) || empty($post) )
    		return;
    
    	if ( empty($file) )
    		$file = '/comments.php';
    
    	$req = get_option('require_name_email');
    
    	/*
    	 * Comment author information fetched from the comment cookies.
    	 */
    	$commenter = wp_get_current_commenter();
    
    	/*
    	 * The name of the current comment author escaped for use in attributes.
    	 * Escaped by sanitize_comment_cookies().
    	 */
    	$comment_author = $commenter['comment_author'];
    
    	/*
    	 * The email address of the current comment author escaped for use in attributes.
    	 * Escaped by sanitize_comment_cookies().
    	 */
    	$comment_author_email = $commenter['comment_author_email'];
    
    	/*
    	 * The url of the current comment author escaped for use in attributes.
    	 */
    	$comment_author_url = esc_url($commenter['comment_author_url']);
    
    	$comment_args = array(
    		'order'   => 'ASC',
    		'orderby' => 'comment_date_gmt',
    		'status'  => 'approve',
    		'post_id' => $post->ID,
    	);
    
    	if ( $user_ID ) {
    		$comment_args['include_unapproved'] = array( $user_ID );
    	} elseif ( ! empty( $comment_author_email ) ) {
    		$comment_args['include_unapproved'] = array( $comment_author_email );
    	}
    
    	$comments = get_comments( $comment_args );
    
    	/**
    	 * Filter the comments array.
    	 *
    	 * @since 2.1.0
    	 *
    	 * @param array $comments Array of comments supplied to the comments template.
    	 * @param int   $post_ID  Post ID.
    	 */
    	$wp_query->comments = apply_filters( 'comments_array', $comments, $post->ID );
    	$comments = &$wp_query->comments;
    	$wp_query->comment_count = count($wp_query->comments);
    	update_comment_cache($wp_query->comments);
    
    	if ( $separate_comments ) {
    		$wp_query->comments_by_type = separate_comments($comments);
    		$comments_by_type = &$wp_query->comments_by_type;
    	}
    
    	$overridden_cpage = false;
    	if ( '' == get_query_var('cpage') && get_option('page_comments') ) {
    		set_query_var( 'cpage', 'newest' == get_option('default_comments_page') ? get_comment_pages_count() : 1 );
    		$overridden_cpage = true;
    	}
    
    	if ( !defined('COMMENTS_TEMPLATE') )
    		define('COMMENTS_TEMPLATE', true);
    
    	$theme_template = STYLESHEETPATH . $file;
    	/**
    	 * Filter the path to the theme template file used for the comments template.
    	 *
    	 * @since 1.5.1
    	 *
    	 * @param string $theme_template The path to the theme template file.
    	 */
    	$include = apply_filters( 'comments_template', $theme_template );
    	if ( file_exists( $include ) )
    		require( $include );
    	elseif ( file_exists( TEMPLATEPATH . $file ) )
    		require( TEMPLATEPATH . $file );
    	else // Backward compat code will be removed in a future release
    		require( ABSPATH . WPINC . '/theme-compat/comments.php');
    }

    ??

    Bo zaraz pod tym powyższym kodem jest znów kod chyba odpowiadający za wyświetlanie komentarzy:

    function comments_popup_script( $width = 400, $height = 400, $file = '' ) {
    	global $wpcommentspopupfile, $wpcommentsjavascript;
    
    	if (empty ($file)) {
    		$wpcommentspopupfile = '';  // Use the index.
    	} else {
    		$wpcommentspopupfile = $file;
    	}
    
    	$wpcommentsjavascript = 1;
    	$javascript = "<script type='text/javascript'>\nfunction wpopen (macagna) {\n    window.open(macagna, '_blank', 'width=$width,height=$height,scrollbars=yes,status=yes');\n}\n</script>\n";
    	echo $javascript;
    }

    Nie mam zielonego pojęcia jak to zrobić dlatego proszę o pomoc.

    Twórca wątku mzcv

    (@mzcv)

    Właśnie jeszcze jej nie umieściłem na serwerze w internecie dlatego też nie mam jak na razie jej podać.

    Twórca wątku mzcv

    (@mzcv)

    Niestety teraz żadnych efektów. Ani zmienionej pozycji ostatniej zakładki ani nic. Tak jak bym w ogóle tego kodu ostatniego nie wkleił.

    Twórca wątku mzcv

    (@mzcv)

    Wszystko by było dobrze gdyby nie to, że część zakładek z menu posiada podzakładki i w momencie dodania tego fragmentu kod wspomniane podzakładki są umieszczone w różnych miejscach strony w około menu.

Viewing 10 replies - 1 through 10 (of 10 total)