• Resolved Boo_77

    (@boo_77)


    I’m not sure what it is I am trying to do.

    If you could just visit this site very quickly I’ll tell you what I want to do that is the same.

    https://www.dooce.com/

    See how she has a main site where she does her daily writing or posting, but then also has three other “buttons” up the top for daily style, daily chuck and daily photo?? And if you go to each of those pages then you can scroll through the other photo’s and such in the daily sections?

    I want to do that but I don’t know if I do that by creating a subdomain or a subfolder? Do you know which I would be best doing and if yes, can you please lead me in the right direction so I can learn how to do that?

    Or can you tell me the difference between the two?? What would you use a subdomain for and what would you use a subfolder for??

    Which has she used?

    Thanks heaps.

    Boo

    https://discoverboo.com

Viewing 15 replies - 31 through 45 (of 50 total)
  • Thread Starter Boo_77

    (@boo_77)

    So I had a bit of a play and replaced everything and played again, and again!

    I seem to have almost got it.

    It’s all gone well right up until that very last part of the code you gave me. The one for the header.php which will call to a different image. As in the last code you gave me here.

    When I do that bit I lose the lines which you were talking about.

    In my images file I have three different images for the lines. One for the single side bar, one for double and one for none.

    The one for none is called “body-no-sidebar.jpg” and it has lines on it, they’re just wider apart than if they has sidebar menu’s in them.

    I did make the assumption that I could just put that in where you have (images/YOUR-NEW-IMAGE.jpg). So I changed it to (images/body-no-sidebar.jpg) but also happened to try other images (which I just copied and changed names for…myimage.jpg) and it still didn’t work.

    Thats when it really stuff’s up. At that step.

    I’ve also noticed with the previous and next page option the button’s are wrong when you flick through the pages. How would I make it so that say “next” was on the right of the page and “previous” was on the left of the page so they’re not right on top of each other?

    Maybe I am not doing something. This bit here,

    “and you’ll want to put that after any other style sheets being called to override the original image.

    That will make any post in that category have a new background image but will not affect the archive page for that category. “

    What does that mean??

    Well, I am going to bed. I am dreaming about code’s btw!

    Boo

    on the image question, two things. When I said to put the code in header.php put it right before the line that says <?php wp_head(); ?>

    Right now it’s being displayed here:

    </div> <!-- End body /-->
    
    	</div>
    
    	<div class="clear"></div>
    
    <style type="text/css">
    .double-right-sidebar div #content-container {
    background-image:url(images/myimage.jpg);
    }
    </style>
    </div>
    </div> <!-- End page /-->

    I assume you put it in the single.php file instead.

    The other issue is that your image is called “my image.jpg” notice the space. Rename the image itself to “myimage.jpg” with no space.

    For the navigation links add this to your style sheet:

    .pagenavigation { float: left; width: 100%; }
    .pagenavigation a {float: right; }
    .pagenavigation a:first-child { float: left; }

    and change the code to look like this:

    <?php if (in_category('photo gallery')) { ?>
    <div class="pagenavigation">
    <?php previous_post_link('%link', 'Previous in category', TRUE); ?>
    <?php next_post_link('%link', 'Next in category', TRUE); ?> 		</div>
    <?php }; ?>

    All I did was remove the
    tag from the code.

    Thread Starter Boo_77

    (@boo_77)

    hmmmmmmm. starting again. bare with me.

    Thread Starter Boo_77

    (@boo_77)

    Well, everything has gone well.

    You might be able to see that the only thing that is not working right now is the background lines.

    The second I put this bit in is when the site wont load. Am I doing something wrong for this?

    <?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
    
    <?php if (in_category('Photo Album) && !is_archive()) { ?>
    <style type="text/css">
    .double-right-sidebar div #content-container {
    background-image:url(images/myimage.jpg);
    }
    </style>
    <?php }; ?>
    
    <?php wp_head(); ?>

    First thing lets fix the navigation:

    <?php if (in_category('photo gallery')) { ?>
    <div class="pagenavigation">
    <?php previous_post_link('%link', 'Previous in category', TRUE); ?>
    <br />
    <?php next_post_link('%link', 'Next in category', TRUE); ?> 		</div>
    <?php }; ?>

    make it look like this:

    <?php if (in_category('photo gallery')) { ?>
    <div class="pagenavigation">
    <?php previous_post_link('%link', 'Previous in category', TRUE); ?>
    <?php next_post_link('%link', 'Next in category', TRUE); ?> 		</div>
    <?php }; ?>

    Removing the <br /> tag.

    Now I’ll take a look at the image issue.

    for an experiment put this right before the <?php wp_head(); ?> in your header.php file.

    <?php if (in_category('photo gallery') && !is_archive()) { ?>
    <style type="text/css">
    .post .entry { background: #e66; }
    </style>
    <?php }; ?>

    It should only make your post content have a pink background. Just to see if that works.

    Thread Starter Boo_77

    (@boo_77)

    OK I’ve put that pink in and left it as is so you can see what it has done.

    Is that what you expected it to do??

    That’s exactly what I wanted to happen.

    So change this stuff:

    <?php if (in_category('photo gallery') && !is_archive()) { ?>
    <style type="text/css">
    .post .entry { background: #e66; }
    </style>
    <?php }; ?>

    To look like like this stuff and see how that goes.

    <?php if (in_category('photo gallery') && !is_archive()) { ?>
    <style type="text/css">
    .double-right-sidebar div #content-container {background-image: url(https://discoverboo.com/wp-content/themes/elegant-grunge.1.0.1/elegant-grunge/images/body-no-sidebar.jpg); }
    .double-right-sidebar div #footer-wrap { background-image: url(https://discoverboo.com/wp-content/themes/elegant-grunge.1.0.1/elegant-grunge/images/footer-no-sidebar.jpg); }
    #body { float:none; width:700px; margin-left: 100px; }
    </style>
    <?php }; ?>

    One thing I noticed though. Your theme obviously has options to have different layouts, I assume in the admin panel you can choose these. Your Videos page has one column layout. Is the options only for pages or can it be applied to posts as well? What the new code above is doing is basically styling that page like your videos page. It might be easier, if possible, to just select that layout from the admin. Again though, I’m not familiar with your theme enough to answer that.

    Thread Starter Boo_77

    (@boo_77)

    I think I love you! You’re an absolute legend! This is fantastic, exactly what I had in my mind when I set out to do this. Over the moon, couldn’t be happier THANK YOU SO MUCH!!!

    Yes the elegant grunge has options that I can control within the admin section. For those two other pages, (video’s and about pages) I can chose if I want single, double or no sidebar. I think thats about it in terms of control though. It hasn’t given me the option to control the new page that we’ve created though so I am pleased that you were able to help me with that code.

    So just a couple other questions about this. Hopefully they wont involve TOO much work LOL

    Can this page have a static page? Thats really just a question, not a can you do it for me. I can come back when I am ready to do something like that MUCH later down the track.

    If you go to the shadow dancing page someone has left a comment on an individual photo and it’s shown up a bit funny at the bottom of the page itself.

    Is that a code thing or is that a photo gallery thing?? I’d much rather it if they could comment on the page and not specific photo’s.

    Ahhhh, once again. Thank you. I hope this has been a good learning curve for you and that I have been a moderately good student ??

    As for making it a static page, not sure actually.

    Can you explain what you mean by “…a comment on an individual photo and it’s shown up a bit funny…” If it’s just the way the comments are styled, that can probably be changed. For them being able to click a photo and taken to a new post page for the individual photo, I’m going to say that’s the gallery script. It looks like it wraps the image in a link for that. you should be able to modify the script not to make the photo a link but then you could never see the full size image. Is that what you mean?

    I guess I just need more specific info for those last question to be of any help.

    I haven’t done this particular code before but I am fairly familiar with the functions and loops inside WP so it was interesting trying something new out, and you did fine ??

    Thread Starter Boo_77

    (@boo_77)

    Specifically on that shadow dancing page, a friend clicked on the photo of our cat and left a comment on that photo.

    If you click on that photo the comment appears as per the normal kind of comment.

    But then back on the main shadow dancing page, where it shows all of the photo’s from that upload, the comments section down the bottom appears to have my “recent comments” widget displayed in it.

    I would rather be able to see the full sized image sincewe have have family all over Australia that come to check out what we’re up to. So if it’s just that widget, I might just turn it off. I’ll do that and see what happens.

    Thread Starter Boo_77

    (@boo_77)

    Nope. That didn’t work. I thought removing the widgets might have taken the recent comments out of that comment form but it did nothing.

    Hmmm… interesting. I looked around the site, is that the only place that is showing up?

    Isn’t it supposed to be in the sidebar by default? I know we’re suppressing the sidebar on those post pages so I’m just at a loss.

    I have never actually used a wiget-ized sidebar so I’m not to sure whats going on. Sorry about that.

    Thanks for the kind words as well ??

    Okay, if you don’t want them to be able to post comments on the individual pictures, try this code out.

    In your single.php find this line:

    <?php comments_template(); ?>

    Change it to look like this:

    <?php
    $cat_obj = $wp_query->get_queried_object();
    if( $cat_obj->parent ) :
    ?>
    <?php else : ?>
    <?php comments_template(); ?>
    <?php endif; ?>

    This should only display the comments and comment form on just category parent pages and not the child pages.

    I don’t have child pages set up locally so I be totally sure if this will work but looking at your URLs it appears to me that it should.

    for example this is a parent page:
    discoverboo.com/2009/01/14/shadow-dancing/

    this appears to be a child page:
    discoverboo.com/2009/01/14/shadow-dancing/shadow-dancing-2/

    Thread Starter Boo_77

    (@boo_77)

    I’ll try that code very soon but for now it’s dinner time.

    I was just in the dashboard and there was a notice to a ping back to that post. It was the exact stuff I was talking about. So I’ve deleted that and all seems to be well in the world.

    Being that I don’t know what a ping back is or what it’s purpose is, I am not sure if I need to do anything to stop that from happening in the future?

Viewing 15 replies - 31 through 45 (of 50 total)
  • The topic ‘Can you help me??’ is closed to new replies.