WordPress.org

Ready to get started?Download WordPress

Forums

Customising pages in a theme (5 posts)

  1. pacpro
    Member
    Posted 5 years ago #

    I want to customise the page in Corporate theme. But if I customise the widths of post and sidebar on one page, the sidebar shifts to the bottom on About page. Also I want to add pages as per my own colour schemes in Corporate theme.

    Please give solution.
    Sandip.

  2. eelaff
    Member
    Posted 4 years ago #

    <div id="side-right" class="clearfloat">
    <div id="sidebar">
    <?php if ( is_home() || is_page(diving-resorts) ) { ?>
    <div class="kutu2">
    <div class="ust2"><span></span></div>
    <div class="spacer">
    <h2>Discover a Hidden Treasure</h2>
    Mysterious depths containing richness so abundant that the mind fails to imagine its bounty.
    Exuberant fish of assorted colors dancing around brilliant corals hard and soft. Magnificent creatures of the deep graciously gliding to the rhythm of nature. Clear warm waters unfolding an enchanting realm. The Maldives, every divers dream!
    </div> <div class="alt2"><span></span></div></div>

    <?php } ?>

    <?php /* Widgetized sidebar, if you have the plugin installed. */
    if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>

    <div class="kutu">
    <div class="ust"><span></span></div><div class="spacer">

    <h2>Categories</h2>

      <?php wp_list_categories('show_count=1&title_li='); ?>

    </div><div class="alt"><span></span></div></div>

    <?php if ( is_home() || is_single() ) { ?>

    <div class="kutu">
    <div class="ust"><span></span></div><div class="spacer">

    <h2>Latest Comments</h2>
    <?php global $wpdb, $comments, $comment;
    $comments = $wpdb->get_results("SELECT comment_author, comment_author_url, comment_ID, comment_post_ID, comment_date, SUBSTRING(comment_content,1,50) AS comment_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID = $wpdb->posts.ID) WHERE comment_approved = '1' AND comment_type = '' AND post_password = '' ORDER BY comment_date_gmt DESC LIMIT 5"); ?>
    <ul id="tab_content_comments" class="tab_content_list1"> <!-- Latest comments -->

    <?php if ( $comments ) : foreach ($comments as $comment) :
    echo '<li class="latestcomment">' . sprintf(__('%1$s <span class="commententrytitle"> - ' .strip_tags($comment->comment_date).
    ''.'
    %2$s</span>
    %4$s …'),
    'comment_post_ID) . '#comment-' . $comment->comment_ID . '" title="' . $comment->comment_author . ' - ' . get_the_title($comment->comment_post_ID) . '"><span class="meta">' . $comment->comment_author . '</span>',
    get_the_title($comment->comment_post_ID),
    get_permalink($comment->comment_post_ID),
    strip_tags($comment->comment_excerpt) ) .'';
    endforeach; endif; ?>

    </div><div class="alt"><span></span></div></div>

    <?php } ?>

    <?php if ( is_archive() || is_search() || is_page() ) { ?>

    <div class="kutu">
    <div class="ust"><span></span></div><div class="spacer">

    <h2>Archives</h2>

      <?php wp_get_archives('type=monthly'); ?>

    </div><div class="alt"><span></span></div></div>

    <?php } ?>

    <?php if ( is_home() || is_archive() || is_search() ) { ?>

    <div id="tag_cloud" class="kutu">
    <div class="ust"><span></span></div><div class="spacer">
    <h2>Tag Cloud</h2>
    <?php wp_tag_cloud('smallest=8&largest=22&number=45&format=flat'); ?>

    </div><div class="alt"><span></span></div></div>

    <?php } ?>

    <?php if ( is_home() ) { ?>

    <div class="kutu">
    <div class="ust"><span></span></div><div class="spacer">
    <h2>Blogroll</h2>

      <?php wp_list_bookmarks('title_li=&categorize=0'); ?>

    </div><div class="alt"><span></span></div></div>

    <?php } ?>

    <?php if (is_single() ) { ?>

    <div class="kutu">
    <div class="ust"><span></span></div><div class="spacer">

    <h2>Latest Posts</h2>

    <?php query_posts('showposts=10'); ?>

      <?php while (have_posts()) : the_post(); ?>
      <li class="latestpost">
      " title="<?php the_title(); ?>"><?php the_title(); ?>
      <span class="latestpostmeta"><?php the_time('M jS, Y') ?> | <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?> </span>
      <?php endwhile; ?>

    </div><div class="alt"><span></span></div></div>

    <?php } ?>

    <?php if ( is_home() || is_single() ) { ?>
    <div class="kutu">
    <div class="ust"><span></span></div><div class="spacer">

    <h2>Meta</h2>

    </div><div class="alt"><span></span></div></div>

    <?php } ?>

    <?php endif; ?>

  3. eelaff
    Member
    Posted 4 years ago #

    can someone please tell me how to exclude the part in BOLD from a sertain page only and appear in all other pagers

  4. lelandf
    Member
    Posted 4 years ago #

    Use a conditional tag. Put it around something like:

    <?php if (!is_page('page-slug-here')) { [Code here] } ?>

    With page-slug-here being the slug of the page you don't want it to show up on.

  5. bawalker2001
    Member
    Posted 4 years ago #

    I'm looking to customize the Corporate theme also - I want to add 2 page templates - one that moves the sidebar to the left and one that has no sidebar, full width on center content.

    Can someone help me in how to quickly do that?

Topic Closed

This topic has been closed to new replies.

About this Topic