Odpowiedź forum utworzona

Viewing 15 replies - 16 through 30 (of 49 total)
  • Twórca wątku And1rzej

    (@and1rzej)

    bardzodziękuję za odpowiedź,
    1/ciężko tą wtyczkę skonfigurować pod tym względem, bo to chyba kombajn jest?
    2/a tego widgetu [strony] nie da się włożyć bezpośrednio w content strony? //*czy jest tylko dostepny w sidebarach, lewych, prawych

    Twórca wątku And1rzej

    (@and1rzej)

    powodzenia i miłej zabawy!

    Twórca wątku And1rzej

    (@and1rzej)

    przy czym co ciekawe odtwarzacz nie działa na iPhonie z 6.1.6 (3gs), a odtwarzacz z wtyczki działa na tym systemie, ktoś coś?

    Twórca wątku And1rzej

    (@and1rzej)

    ok. odpowiadam sam sobie:

    wszystko jest tu:

    @param array  $attr {
    2183	 *     Attributes of the audio shortcode.
    2184	 *
    2185	 *     @type string $src      URL to the source of the audio file. Default empty.
    2186	 *     @type string $loop     The 'loop' attribute for the <code><audio></code> element. Default empty.
    2187	 *     @type string $autoplay The 'autoplay' attribute for the <code><audio></code> element. Default empty.
    2188	 *     @type string $preload  The 'preload' attribute for the <code><audio></code> element. Default 'none'.
    2189	 *     @type string $class    The 'class' attribute for the <code><audio></code> element. Default 'wp-audio-shortcode'.
    2190	 *     @type string $style    The 'style' attribute for the <code><audio></code> element. Default 'width: 100%;'.
    2191	 * }
    2192	 * @param string $content Shortcode content.
    2193	 * @return string|void HTML content to display audio.
    2194	 */
    

    czyli :

    [audio src="" style="width: 50%;"]

    Twórca wątku And1rzej

    (@and1rzej)

    dziękuję za Odpowiedź:

    mam taką lokalizację plików z tłumaczeniami *.po, *.mo
    „/wp-content/themes/fortunato-pro child theme/languages/”

    =>

    taką zawartość katalogu:
    „/wp-content/themes/fortunato-pro child theme/languages/fortunatopro.pot
    „/wp-content/themes/fortunato-pro child theme/languages/pl_PL.mo
    „/wp-content/themes/fortunato-pro child theme/languages/pl_PL.po

    =>

    taki <kod/> w functions.php (pliku w katalogu motywu potomnego)

    
    // Load translation files from your child theme instead of the parent theme
    function my_child_theme_locale() {
            load_child_theme_textdomain( 'fortunato-pro', get_stylesheet_directory() . '/languages' );
    }
    add_action( 'after_setup_theme', 'my_child_theme_locale' );
    

    =>

    wynik – doesn’t work 🙁

    Twórca wątku And1rzej

    (@and1rzej)

    już zgłupiałem, co tu ’????’ ma być nazwa (a)motywu nadrzędnego [my_parent_theme], czy (b)potomnego [child_theme]:

    
    // Load translation files from your child theme instead of the parent theme
    function my_child_theme_locale() {
        load_child_theme_textdomain( '?????', get_stylesheet_directory() . '/languages' );
    }
    add_action( 'after_setup_theme', 'my_child_theme_locale' );
    

    tak i tak nie działa…

    Twórca wątku And1rzej

    (@and1rzej)

    czyli stylowanie [spersonalizowanego panelu logowania] z poziomu pliku functions.php, w motywie potomnym, może wyglądac tak:

    function my_login_logo() { ?>
        <style type="text/css">
    * {
        cursor: crosshair;
    }
            body {
        background: url('http://mojastrona.pl/wp-content/gallery/nazwa_liku.jpg') center/cover no-repeat;
        min-width: 0;
        color: #444;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
        font-size: 13px;
        line-height: 1.4em
    }
        </style>
    <?php }
    add_action( 'login_enqueue_scripts', 'my_login_logo' );

    i po aktualizacji silnika wp, zmiany nie znikną…?

    Twórca wątku And1rzej

    (@and1rzej)

    o dziękuję bardzo! Rozumiem, że

    1
    wystarczy utworzyć taki sam katalog „/languages” w motywie potomnym…

    =>

    2
    dodać ten <kod/> do pliku functions.php motywu potomnego:

    // Load translation files from your child theme instead of the parent theme
    function my_child_theme_locale() {
        load_child_theme_textdomain( 'total', get_stylesheet_directory() . '/languages' );
    }
    add_action( 'after_setup_theme', 'my_child_theme_locale' );

    czy w tym kodzie trzeba coś zmieniać, chyba nie?

    Twórca wątku And1rzej

    (@and1rzej)

    dziękuję bardzo za poświecony czas – czyli raczej nie ma metody „poza wtyczką”?

    ten mały imperatyw, żeby to było inaczej niż za pomocą wtyczki, wynika z małych sugestii technicznych administratora serwera (słusznych), żeby wtyczek było możliwie jak najmniej, wtyczkę do panelu logowania już miałem, muszę się zastanowić…

    =>

    mam jeszcze trochę podobny problem z ręcznym tłumaczeniem motywu, jaki zrobiłem w PoEdit

    nie rozumiem dlaczego lokalizacja plików tłumaczeń *.po, *.mo, jest w motywie nadrzędnym: „/www/wp-content/themes/motyw_nadrzędny/languages/pl_pl.po”, a nie np. w potomnym, i też przy aktualizacji motywu nadrzędnego, muszę je raz jeszcze wrzucać na ftp…

    zgodnie z tym co mam w functions:

    function ample_setup() {
    
    	/*
    	 * Make theme available for translation.
    	 * Translations can be filed in the /languages/ directory.
    	 */
    	load_theme_textdomain( 'ample', get_template_directory() . '/languages' );

    może ten kod powinienem (1)dać do pliku functions.php ale motywu potomnego, (2) i zmienić jakoś lokalizację ?

    Twórca wątku And1rzej

    (@and1rzej)

    tak – oczywiście, dziękuję za czujność;-), nie mniej wyraziłem się po prostu mało precyzyjnie, miałem oczywiście na myśli taką lokalizację plików z tłumaczeniami:

    /wp-content/plugins/the-events-calendar/languages/the-events-calendar-pl_PL.po

    /wp-content/plugins/nazwa_wtyczki/languages/nazwa_wtyczki-pl_PL.po

    =>

    Należało by też przepatrzeć pliki JavaScript.
    A możesz podać link do tej wtyczki?

    RE – może info z consoli ?

    Twórca wątku And1rzej

    (@and1rzej)

    Dziękuję za Odpowiedź

    – tak właśnie zrobiłem, ale mam mały problem, mam ciągle coś takiego

    To Event minęło

    << All Wydarzenia

    i co ciekawe nie ma tego w PoEdit w plikach tłumaczenia.po więc nie mam jak to zmienić…

    btw
    czy ta lokalizacja „/plugin/language”

    dotyczy globalnie wszystkich pluginów, czy tylko The Events Calendar

    Twórca wątku And1rzej

    (@and1rzej)

    Dziękuję za Odpowiedź:

    wiem, że mam ogromne zaległości (bo jeszcze zajmuję się innymi rzeczami), w nauce, ale wydaje mi się, że ta kolejność jest nie tyle nie prawidłowa, co nie ma po h2 <tagów> php o thumbnail, hmm:

    <?php
    /**
     * Template part for displaying posts.
     *
     * @link https://codex.wordpress.org/Template_Hierarchy
     *
     * @package underscores
     */
    
    ?>
    
    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    	<header class="entry-header">
    		<?php
    		if ( is_single() ) :
    			the_title( '<h1 class="entry-title">', '</h1>' );
    		else :
    			the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
    		endif;
    
                    //HERE LACK OF THUMB TAG, if I understand properly...
    
    		if ( 'post' === get_post_type() ) : ?>
    		<div class="entry-meta">
    			<?php underscores_posted_on(); ?>
    		</div><!-- .entry-meta -->
    		<?php
    		endif; ?>
    	</header><!-- .entry-header -->
    
    	<div class="entry-content">
    		<?php
    			the_content( sprintf(
    				/* translators: %s: Name of current post. */
    				wp_kses( __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'underscores' ), array( 'span' => array( 'class' => array() ) ) ),
    				the_title( '<span class="screen-reader-text">"', '"</span>', false )
    			) );
    
    			wp_link_pages( array(
    				'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'underscores' ),
    				'after'  => '</div>',
    			) );
    		?>
    	</div><!-- .entry-content -->
    
    	<footer class="entry-footer">
    		<?php underscores_entry_footer(); ?>
    	</footer><!-- .entry-footer -->
    </article><!-- #post-## -->
    
    Twórca wątku And1rzej

    (@and1rzej)

    aczkolwiek, nie wiem jeszcze m.in. tego, dlaczego u mnie jest najpierw (patrząc od góry do dołu) miniatura obrazka wyróżniającego dla posta, a potem tytuł posta, który logicznie powinien być nad tym zdjęciem (obrazkiem wyróżniającym dla tegoż posta)

    w statycznej stronie html/css/js:

    kolejność znaczników w kodzie

    (…)
    <h2 class=””>

    <p>
    <btn>
    (..)

    odpowiada temu co widzimy na stronie

    w php nie widzę gdzie to zmienić… na jakim ukrytym rejestrze coś „trzyma” tą kolejność

    =>

    co ciekawe kolejność w głównej pętli bloga [index.php] sugeruję coś innego, i wydaje się być
    właśnie prawidłowa, <H2> w kodzie jest nad zdjęciem wyróżniającym, a mimo to już na samej stronie h2 wyświetla się pod zdjęciem…

    <?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 https://codex.wordpress.org/Template_Hierarchy
     *
     * @package underscores
     */
    
    get_header(); ?>
    
    	<div id="primary" class="content-area">
    		<main id="main" class="site-main" role="main">
    
    		<?php
    		if ( have_posts() ) :
    
    			if ( is_home() && ! is_front_page() ) : ?>
    			
    			
    			
    				<header class="entry-header">
    					<h2 class="entry-title"><?php single_post_title(); ?></h2><hr> 
    					
    					
    					
    					<?php the_excerpt(); ?>
    					
    
    				</header>
    
    				
    
    			<?php
    			endif;
    
    			/* Start the Loop */
    			while ( have_posts() ) : the_post();
    		// check if the post has a Post Thumbnail assigned to it.
    if ( has_post_thumbnail() ) {
    	the_post_thumbnail();
    } 
    			
    				/*
    				 * Include the Post-Format-specific template for the content.
    				 * If you want to override this in a child theme, then include a file
    				 * called content-___.php (where ___ is the Post Format name) and that will be used instead.
    				 */
    				get_template_part( 'template-parts/content', get_post_format() );
    
    				
    				
    			endwhile;
    
    			the_posts_navigation();
    
    			
    			
    			
    		else :
    
    			get_template_part( 'template-parts/content', 'none' );
    
    		endif; ?>
    			
    		<a class="btn" href="<?php echo the_permalink(); ?>">Read More <span class="glyphicon glyphicon-chevron-right"></span></a>
    		</main><!-- #main -->
    	</div><!-- #primary -->
    
    <?php
    get_sidebar();
    get_footer();
    Twórca wątku And1rzej

    (@and1rzej)

    działa – does work !

    pana rady i wskazówki okazały się bezcenne, dziękuje z całego serca !!!

    Forum: Motywy
    W odpowiedzi na: drop-menu w underscores
    Twórca wątku And1rzej

    (@and1rzej)

    dziękuję bardzo – właśnie o to chodziło !

    problem rozwiązany

Viewing 15 replies - 16 through 30 (of 49 total)