WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Slideshow for particular page using Div page id. (3 posts)

  1. jkbaseer
    Member
    Posted 1 year ago #

    Hi all.
    Hope you all fine. I am trying this for hardly 13 hours in two days. I can't find a solution.
    i want to insert a slideshow only at am home page or front page template. i read some topics using the div page id usage. but seriously, nothing helps me or may be am dull.

    Note: i have also inserted some code for not showing a header image at front page template suggested by @esmi.
    site name: kareemalp.com
    Here is header code

    <?php
    /**
     * The Header for our theme.
     *
     * Displays all of the <head> section and everything up till <div id="main">
     *
     * @package WordPress
     * @subpackage Twenty_Twelve
     * @since Twenty Twelve 1.0
     */
    ?><!DOCTYPE html>
    <!--[if IE 7]>
    <html class="ie ie7" <?php language_attributes(); ?>>
    <![endif]-->
    <!--[if IE 8]>
    <html class="ie ie8" <?php language_attributes(); ?>>
    <![endif]-->
    <!--[if !(IE 7) | !(IE 8)  ]><!-->
    <html <?php language_attributes(); ?>>
    <!--<![endif]-->
    <head>
    <meta charset="<?php bloginfo( 'charset' ); ?>" />
    <meta name="viewport" content="width=device-width" />
    <title><?php wp_title( '|', true, 'right' ); ?></title>
    <link rel="profile" href="http://gmpg.org/xfn/11" />
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
    <?php // Loads HTML5 JavaScript file to add support for HTML5 elements in older IE versions. ?>
    <!--[if lt IE 9]>
    <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
    <![endif]-->
    <?php wp_head(); ?>
    </head>
    
    <div id="page" class="hfeed site">
    <header id="masthead" class="site-header" role="banner">
    
    <!-- edit by jk Logo -->
    			<div class="column-half nomargin">
    				<div id="logo"><a href="http://www.kareemalp.com/" target="_blank"><img src="http://kareemalp.com/wp-content/uploads/2013/01/LOGO-KLP.jpg" alt="Kareema" width="195" height="95" align="right" border="0"></a>
    				</div>
    
    			<div class="column-half nomargin">
    				<div id="logo"><a href="http://www.nts.com/" target="_blank"><img src="http://kareemalp.com/wp-content/uploads/2013/01/HEADER-KLP.jpg" alt="Kareema Leather" width="215" height="95" align="left" border="0"></a>
    				</div>
    
    		<nav id="site-navigation" class="main-navigation" role="navigation">
    			<h3 class="menu-toggle"><?php _e( 'Menu', 'twentytwelve' ); ?></h3>
    			<a class="assistive-text" href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentytwelve' ); ?>"><?php _e( 'Skip to content', 'twentytwelve' ); ?></a>
    			<?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' ) ); ?>
    		</nav><!-- #site-navigation -->
    
    <!----Header slideshow code by jk----!>
    		<?php do_action('slideshow_deploy', '223'); ?>
    		if ( ! empty( $header_image ) && !is_front_page() && !is_home() ) : ?>
    
    		<!--- Static header for all page except front page template---!>
    		<?php $header_image = get_header_image();
    		if ( ! empty( $header_image ) && !is_front_page() && !is_home() ) : ?>
    <a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src="<?php echo esc_url( $header_image ); ?>" class="header-image" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" /></a>
    		<?php endif; ?>
    
    	</header><!-- #masthead -->
    
    	<div id="main" class="wrapper">

    Thank you all for the support. God bless :)

  2. jkbaseer
    Member
    Posted 1 year ago #

    hello anyone?

  3. jkbaseer
    Member
    Posted 1 year ago #

    Am proud that i did it by own effort by reading the documentation..

    <?php if ( is_front_page() ) {
    do_action('slideshow_deploy', '223');
    } ?>

    Thats it. Simple. Anyways thank you to wordpress supports :-)

Topic Closed

This topic has been closed to new replies.

About this Topic