• Najnowsze pytania
  • Bez odpowiedzi
  • Zadaj pytanie
  • Kategorie
  • Tagi
  • Zdobyte punkty
  • Ekipa ninja
  • IRC
  • FAQ
  • Regulamin
  • Książki warte uwagi

Wordpress konfiguracja motywu

Object Storage Arubacloud
0 głosów
411 wizyt
pytanie zadane 3 sierpnia 2017 w HTML i CSS przez kamis Początkujący (400 p.)

Cześć,

Chciałbym dodać karuzele/slider na stronie głównej w tym motywie https://themeisle.com/demo/?theme=Hestia. Jednak nie potrafię tego zrobić(pierwszy raz działam w wordpresie) i dodam jeszcze, że jest to darmowa wersja szablonu. Chciałbym się dowiedzieć w jakim pliku działać, widziałem hierarchie jednak i tak nadal tego nie potrafię ogarnąć.

1 odpowiedź

0 głosów
odpowiedź 3 sierpnia 2017 przez Jedras Maniak (54,860 p.)
Masz w sumie dwie drogi:
- próbować za pomocą jakiegoś pluginu, np. https://www.wonderplugin.com/wordpress-carousel/
- edytować szablon
komentarz 3 sierpnia 2017 przez kamis Początkujący (400 p.)

Dzięki za pomoc. Własnie mam tą wtyczkę i wiem, że trzeba dopisać mały kod króciutki już wiem gdzie, ale nie wiem jak, znalazłem takie coś w jednym pliku może wiesz gdzie to dokleić.

 

<?php
/**
 * Big Title section for the homepage.
 *
 * @package Hestia
 * @since Hestia 1.0
 */

if ( ! function_exists( 'hestia_big_title' ) ) :
	/**
	 * Big title section content.
	 *
	 * @since Hestia 1.0
	 */
	function hestia_big_title() {
		hestia_before_big_title_section_trigger();
	?>
		<div id="carousel-hestia-generic" class="carousel slide" data-ride="carousel">
			<div class="carousel slide" data-ride="carousel">
				<div class="carousel-inner">
					<?php

					if ( current_user_can( 'edit_theme_options' ) ) {
						/* translators: 1 - link to customizer setting. 2 - 'customizer' */
						$hestia_big_title_title = get_theme_mod( 'hestia_big_title_title', sprintf( esc_html__( 'Change in %s','hestia' ), sprintf( '<a href="%1$s" class="default-link">%2$s</a>', esc_url( admin_url( 'customize.php?autofocus&#91;control&#93;=hestia_big_title_title' ) ), __( 'Customizer','hestia' ) ) ) );
						/* translators: 1 - link to customizer setting. 2 - 'customizer' */
						$hestia_big_title_text = get_theme_mod( 'hestia_big_title_text', sprintf( esc_html__( 'Change this subtitle in %s.','hestia' ), sprintf( '<a href="%1$s" class="default-link">%2$s</a>', esc_url( admin_url( 'customize.php?autofocus&#91;control&#93;=hestia_big_title_text' ) ), __( 'Customizer','hestia' ) ) ) );
						$hestia_big_title_button_text = get_theme_mod( 'hestia_big_title_button_text', esc_html__( 'Change in the Customizer', 'hestia' ) );
						$hestia_big_title_button_link = get_theme_mod( 'hestia_big_title_button_link', esc_url( admin_url( 'customize.php?autofocus&#91;control&#93;=hestia_big_title_button_text' ) ) );
					} else {
						$hestia_big_title_title       = get_theme_mod( 'hestia_big_title_title' );
						$hestia_big_title_text        = get_theme_mod( 'hestia_big_title_text' );
						$hestia_big_title_button_text = get_theme_mod( 'hestia_big_title_button_text' );
						$hestia_big_title_button_link = get_theme_mod( 'hestia_big_title_button_link' );
					}
					$hestia_big_title_background  = get_theme_mod( 'hestia_big_title_background', get_template_directory_uri() . '/assets/img/slider2.jpg' );

					if ( ! empty( $hestia_big_title_background ) || ! empty( $hestia_big_title_title ) || ! empty( $hestia_big_title_text ) || ( ! empty( $hestia_big_title_button_text ) && ! empty( $hestia_big_title_button_link ) ) ) {
					?>
						<div class="item active">
							<div class="page-header header-filter" 
							<?php
							if ( ! empty( $hestia_big_title_background ) ) {
								echo 'style="background-image: url(' . esc_url( $hestia_big_title_background ) . ')"';}
?>
>
								<?php
								if ( is_customize_preview() ) {
								?>
									<div class="big-title-image"></div>
									<?php
								}
								hestia_before_big_title_section_content_trigger();
								?>
								<div class="container">
									<div class="row">
										<div class="col-md-8 col-md-offset-2 text-center">
											<?php if ( ! empty( $hestia_big_title_title ) ) { ?>
												<h1 class="hestia-title"><?php echo wp_kses_post( $hestia_big_title_title ); ?></h1>
											<?php } ?>
											<?php if ( ! empty( $hestia_big_title_text ) ) { ?>
												<span class="sub-title"><?php echo wp_kses_post( $hestia_big_title_text ); ?></span>
											<?php } ?>
											<?php if ( ! empty( $hestia_big_title_button_link ) && ! empty( $hestia_big_title_button_text ) ) { ?>
												<div class="buttons">
													<a href="<?php echo esc_url( $hestia_big_title_button_link ); ?>" title="<?php echo esc_html( $hestia_big_title_button_text ); ?>"
													   class="btn btn-primary btn-lg" <?php hestia_is_external_url( $hestia_big_title_button_link ); ?>><?php echo esc_html( $hestia_big_title_button_text ); ?></a>
												</div>
											<?php } ?>
										</div>
									</div>
								</div>
								<?php hestia_after_big_title_section_content_trigger(); ?>
							</div>
						</div>
						<?php
					}// End if().
					?>
					</div>
				</div>
			</div>
			<?php hestia_after_big_title_section_trigger(); ?>
		</div>
		<?php
	}
endif;

if ( ! function_exists( 'hestia_slider_compatibility' ) ) :

	/**
	 * Check for previously set slider and make theme compatible.
	 */
	function hestia_slider_compatibility() {
		$hestia_big_title_background  = get_theme_mod( 'hestia_big_title_background' );
		$hestia_big_title_title       = get_theme_mod( 'hestia_big_title_title' );
		$hestia_big_title_text        = get_theme_mod( 'hestia_big_title_text' );
		$hestia_big_title_button_text = get_theme_mod( 'hestia_big_title_button_text' );
		$hestia_big_title_button_link = get_theme_mod( 'hestia_big_title_button_link' );

		$hestia_slider_content = get_theme_mod( 'hestia_slider_content' );

		if ( ! empty( $hestia_big_title_background ) || ! empty( $hestia_big_title_title ) || ! empty( $hestia_big_title_text ) || ! empty( $hestia_big_title_button_text ) || ! empty( $hestia_big_title_button_link ) ) {
			hestia_big_title();
		} else {
			if ( ! empty( $hestia_slider_content ) ) {
				hestia_slider();
			} else {
				hestia_big_title();
			}
		}
	}
endif;

add_action( 'hestia_header', 'hestia_slider_compatibility' );
(cc) 2006-2012 ForgottenLabs.com

 

Podobne pytania

0 głosów
1 odpowiedź 2,251 wizyt
pytanie zadane 3 sierpnia 2017 w Inne języki przez kamis Początkujący (400 p.)
0 głosów
1 odpowiedź 242 wizyt
0 głosów
0 odpowiedzi 89 wizyt

92,555 zapytań

141,403 odpowiedzi

319,557 komentarzy

61,940 pasjonatów

Motyw:

Akcja Pajacyk

Pajacyk od wielu lat dożywia dzieci. Pomóż klikając w zielony brzuszek na stronie. Dziękujemy! ♡

Oto polecana książka warta uwagi.
Pełną listę książek znajdziesz tutaj.

Akademia Sekuraka

Kolejna edycja największej imprezy hakerskiej w Polsce, czyli Mega Sekurak Hacking Party odbędzie się już 20 maja 2024r. Z tej okazji mamy dla Was kod: pasjamshp - jeżeli wpiszecie go w koszyku, to wówczas otrzymacie 40% zniżki na bilet w wersji standard!

Więcej informacji na temat imprezy znajdziecie tutaj. Dziękujemy ekipie Sekuraka za taką fajną zniżkę dla wszystkich Pasjonatów!

Akademia Sekuraka

Niedawno wystartował dodruk tej świetnej, rozchwytywanej książki (około 940 stron). Mamy dla Was kod: pasja (wpiszcie go w koszyku), dzięki któremu otrzymujemy 10% zniżki - dziękujemy zaprzyjaźnionej ekipie Sekuraka za taki bonus dla Pasjonatów! Książka to pierwszy tom z serii o ITsec, który łagodnie wprowadzi w świat bezpieczeństwa IT każdą osobę - warto, polecamy!

...