Forum Replies Created

Viewing 15 replies - 31 through 45 (of 74 total)
  • Forum: Fixing WordPress
    In reply to: Page Design
    Thread Starter macart

    (@macart)

    How do you design pages separately from posts, when .post in the css seems to be on every page created in wordpress?

    Forum: Fixing WordPress
    In reply to: Page Design
    Thread Starter macart

    (@macart)

    My site is using a static front page with the Blog page acting as my posts’ page. I’ve setup a page.php and have my index.php. Index.php is for my blog and page.php is for the other static pages.

    If I take out the info below out of my page.php then it doesn’t pull in the page I have setup.

    <?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
            <div class="post">
            <h2><?php the_title(); ?></h2>
            <div class="entry">
            <?php the_content(); ?>
            </div>
            <!--End Entry-->
            <span class="editthis"><?php edit_comment_link('FIX THIS'); ?></span>
            </div>
            <!--End Post-->
            <?php endwhile; ?>
            <?php else: ?>
            <h2> Not Found</h2>
            <p> Sorry what your looking for isn't here, please try again!</p>
            <?php endif; ?>

    How do I pull in my pages, about, etc. What do I change in the code above? So that I can style my .posts separately from my pages?

    Forum: Fixing WordPress
    In reply to: Page Design
    Thread Starter macart

    (@macart)

    How do you design the pages differently? Since .post in the css effects every page? Am I missing something?

    Forum: Fixing WordPress
    In reply to: Categories?
    Thread Starter macart

    (@macart)

    <?php if( is_page('Page A') ) get_sidebar('one');
    elseif( is_page('Page B') ) get_sidebar('two');
    else get_sidebar();?>

    Where does this code go? index.php?

    Thanks

    Forum: Fixing WordPress
    In reply to: Page Design
    Thread Starter macart

    (@macart)

    How is this done when any change to .post in the css is applied to every page?

    Forum: Fixing WordPress
    In reply to: Categories?
    Thread Starter macart

    (@macart)

    Anyone?

    Forum: Fixing WordPress
    In reply to: Categories?
    Thread Starter macart

    (@macart)

    Anyone have any thoughts on the best way to resolve my first question? Happy Holidays!

    Forum: Fixing WordPress
    In reply to: Categories?
    Thread Starter macart

    (@macart)

    Thanks for the reply esmi.

    Yes my site is using a static front page with the Blog page acting as my posts’ page.

    Thread Starter macart

    (@macart)

    Duh! Sorry just realized this is linking to the offsite files “https://widgets.twimg.com/j/1/widget.js&#8221; & “https://widgets.twimg.com/j/1/widget.css&#8221;. Sorry Im New to this stuff.

    Thread Starter macart

    (@macart)

    I don’t know if this is correct, but fixed it for the moment.

    <div id="contentBanner"><?php if (is_front_page() ) {
    $hdrimg = 'home.jpg';} elseif ( is_page('store') ) {
    $hdrimg = 'store.jpg';} elseif ( is_page('about') ) {
    $hdrimg = 'about.jpg';} elseif ( is_page('gallery') ) {
    $hdrimg = 'gallery.jpg';} elseif ( is_home('blog') ) {
    $hdrimg = 'blog.jpg';} elseif ( is_page('hidden') ) {
    $hdrimg = 'hidden.jpg';} ?><img src="<?php echo bloginfo('template_directory') . '/images/' . $hdrimg; ?>" /></div>

    Thread Starter macart

    (@macart)

    Yes I have a page named blog, that is my page for posts.

    <div id=”contentBanner”><?php if (is_home() ) {
    $hdrimg = ‘home.jpg’;} elseif ( is_page(‘store’) ) {
    $hdrimg = ‘store.jpg’;} elseif ( is_page(‘about’) ) {
    $hdrimg = ‘about.jpg’;} elseif ( is_page(‘gallery’) ) {
    $hdrimg = ‘gallery.jpg’;} elseif ( is_page(‘blog’) ) {
    $hdrimg = ‘blog.jpg’;} elseif ( is_page(‘hidden’) ) {
    $hdrimg = ‘hidden.jpg’;} ?><img src=”<?php echo bloginfo(‘template_directory’) . ‘/images/’ . $hdrimg; ?>” /></div>

    Thread Starter macart

    (@macart)

    I tried changing my code to page #’s, blog page is still loading home.jpg instead of blog.jpg.

    <div id="contentBanner"><?php if (is_home('3') ) {
    $hdrimg = 'home.jpg';} elseif ( is_page('5') ) {
    $hdrimg = 'store.jpg';} elseif ( is_page('2') ) {
    $hdrimg = 'about.jpg';} elseif ( is_page('8') ) {
    $hdrimg = 'gallery.jpg';} elseif ( is_page('10') ) {
    $hdrimg = 'blog.jpg';} elseif ( is_page('12') ) {
    $hdrimg = 'hidden.jpg';} ?><img src="<?php echo bloginfo('template_directory') . '/images/' . $hdrimg; ?>" /></div>
    Thread Starter macart

    (@macart)

    Excellent Thank You! Only issue is blog page is loading home.jpg instead of blog.jpg. Any ideas?

    <div id="contentBanner"><?php if (is_home() ) {
    $hdrimg = 'home.jpg';} elseif ( is_page('store') ) {
    $hdrimg = 'store.jpg';} elseif ( is_page('about') ) {
    $hdrimg = 'about.jpg';} elseif ( is_page('gallery') ) {
    $hdrimg = 'gallery.jpg';} elseif ( is_page('blog') ) {
    $hdrimg = 'blog.jpg';} elseif ( is_page('hidden') ) {
    $hdrimg = 'hidden.jpg';} ?><img src="<?php echo bloginfo('template_directory') . '/images/' . $hdrimg; ?>" /></div>
    Thread Starter macart

    (@macart)

    Tried this also doesn’t work. Does this also need to have a function, not clear in the codex to me?

    <div id="contentBanner"><?php
    if ( is_page('about') || $post->post_parent == '2' ) {
        // the page is "About", or the parent of the page is "About"
        $contentBannerimg = 'about.jpg';
    
    } else {
        $contentBannerimg = 'home.jpg'; // just in case we are at an unclassified page, perhaps the home page
    }
    ?>
    </div>
    Thread Starter macart

    (@macart)

    I tried, doesn’t work. Will this code only work in a header.php file? New to this, so not sure of all things wordpress yet.

    <div id="contentBanner"><?php if (is_page('home') ) {
    $hdrimg = 'home.jpg';} elseif ( is_page('store') ) {
    $hdrimg = 'store.jpg';} elseif ( is_page('about') ) {
    $hdrimg = 'about.jpg';} elseif ( is_page('gallery') ) {
    $hdrimg = 'gallery.jpg';} elseif ( is_page('hidden') ) {
    $hdrimg = 'hidden.jpg';} ?><img src="<?php echo $hdrimg; ?>" /></div>

Viewing 15 replies - 31 through 45 (of 74 total)