• Добрый день!
    Подскажите, пожалуйста, в чём может быть проблема?

    Создаю страничку в вордпрессе, добавляю элемент html, вставляю туда код спойлера – всё работает.

    Пытаюсь добавить код в один из блоков footer.php – код спойлера и его содержимое выдаётся просто текстом….

    Я не очень программист-то.. просто хотел спойлер добавить.
    Тема StartRight

    Спасибо!

    Текст футера –

    <?php
    /**
     * The template for displaying the footer.
     *
     * Contains the closing of the #content div and all content after
     *
     * @package startright
     */
    $startright_layout_first_footer					 = '';
    $startright_layout_second_footer				 = '';
    $startright_color_footer_copyright_background	 = '';
    $startright_layout_first_footer					 = startright_get_option( 'startright_layout_first_footer' );
    ?>
    
    	<!-- <div class="container"><div class="row">
    					форма обратной связи
    		</div></div> -->
    		
    	<div class="container"><div class="row">
    		<div style="float:right; margin-right:11px; padding: 6px;">	
    			<div class="share"></div>
    <script src="/wp-content/themes/startright/js/share/share.js"></script>
    						</div>
    		</div></div>
    
    <footer class="startright-footer-container"> 
    	<?php if ( "show" == $startright_layout_first_footer ) { ?>
    		<div class="startright-first-footer-wrapper" style="background-color:#202020!important; padding: 0px 0px 0px 0px!important;">
    			<div class="container">
    				<div class="row">
    					<?php if ( is_active_sidebar( 'first-footer-1' ) ) : ?>
    						<div class="col-lg-4 col-md-4 col-sm-12 col-xs-12" style="padding: 40px 0px 15px 0px!important;">
    							<!-- 1й адрес -->
    <p style="font-size: 98%;" class="has-text-align-center">
    	ТЕКСТ 1<br>
    	[spoiler title="Показать спойлер"]Содержимое спойлера[/spoiler]
    					
    
      
    						</div>
    					<?php endif; ?>
    					<?php if ( is_active_sidebar( 'first-footer-2' ) ) : ?>
    						<div class="col-lg-4 col-md-4 col-sm-12 col-xs-12" style="padding: 40px 0px 15px 0px!important;">
    						</div>
    					<?php endif; ?>
    					<?php if ( is_active_sidebar( 'first-footer-3' ) ) : ?>
    						<div class="col-lg-4 col-md-4 col-sm-12 col-xs-12" style="padding: 40px 0px 15px 0px!important;">
    						</div>
    					<?php endif; ?>
    				</div>
    			</div>
    		</div>
    	<?php } ?>
        <!-- /первый footer -->
      <?php if ( "show" == $startright_layout_first_footer ) { ?>
    		<div class="startright-first-footer-wrapper" style="background-color:#202020!important; padding: 0px 0px 0px 0px!important;">
    			<div class="container">
    				<div class="row">
    					<?php if ( is_active_sidebar( 'first-footer-1' ) ) : ?>
    						<div class="col-lg-4 col-md-4 col-sm-12 col-xs-12" style="padding: 40px 0px 15px 0px!important;">
    						</div>
    					<?php endif; ?>
    					<?php if ( is_active_sidebar( 'first-footer-2' ) ) : ?>
    						<div class="col-lg-4 col-md-4 col-sm-12 col-xs-12" style="padding: 40px 0px 15px 0px!important;">
    						</div>
    					<?php endif; ?>
    			
    					<?php if ( is_active_sidebar( 'first-footer-2' ) ) : ?>
    						<div class="col-lg-4 col-md-4 col-sm-12 col-xs-12" style="padding: 40px 0px 15px 0px!important;">
    
    						</div>
    					<?php endif; ?>
    					
    				</div>
    			</div>
    		</div>
    	<?php } ?>
    	
    	    <!-- /второй footer -->
    	
        <div class="startright-last-footer">
            <div class="container">
                <div class="row">
                    <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
    					<div class="startright-footer-msg">
    						<div class="site-info">......
    							<p style="color:white"><br>....</p>
    
                				<!-- <a href="<?php echo esc_url( __( 'http://wordpress.org/', 'startright' ) ); ?>"><?php printf( __( 'Proudly powered by %s', 'startright' ), 'WordPress' ); ?></a>
                				<span class="sep"></span>
                				<?php printf( __( 'Theme: %2$s by %1$s.', 'startright' ), 'Create and Code', '<a href="" rel="designer">LPA</a>' ); ?>  -->
            				</div><!-- /site-info -->
    					</div>
                    </div>
                </div>
            </div>
        </div>
       
        <a href="#" id="ccfw-back-to-top" title="Back to top"><i class="fa fa-angle-up"></i></a>
    </footer>
    </div><!-- /#startright-page-wrap -->
    </div><!-- /#wrapper -->
    <?php wp_footer(); ?>
    </body>
    </html>
    • This topic was modified 2 years, 6 months ago by pitj007.
    • This topic was modified 2 years, 6 months ago by pitj007.
    • This topic was modified 2 years, 6 months ago by pitj007.
Viewing 1 replies (of 1 total)
  • Thread Starter pitj007

    (@pitj007)

    Пока сообразил сделать так – из исходного кода вытащил подходящие div и вставил их куда надо:

    ‘`<div class=”spoiler-wrap”>
    <div class=”spoiler-head folded”>ЗАГОЛОВОК</div>
    <div class=”spoiler-body”>
    ТЕКСТ
    </div></div>`’

    Так вроде работает..

    • This reply was modified 2 years, 6 months ago by James Huff.
    • This reply was modified 2 years, 6 months ago by pitj007.
    • This reply was modified 2 years, 6 months ago by pitj007.
Viewing 1 replies (of 1 total)
  • The topic ‘Как добавить в footer?’ is closed to new replies.