• 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 - 16 through 30 (of 50 total)
  • oops, double post

    Thread Starter Boo_77

    (@boo_77)

    ok I’ll do that now and see what happens.

    Can you see whats going on there at the moment?? I have installed the two plugins (coz I haven’t got a clue about the code!) one is the inline one, which is apparently making it so I can have posts within pages. And the other is called ultimate catagory excluder. Thats made it so those photo posts don’t show up on my home page.

    I don’t know if you noticed that the two posts I have on that photo album page have the same photo’s in them? Well in the ACTUAL posts they have different photo’s so I don’t know why thats happening. Any clues?? I thought maybe it has something more to do with the the gallery settings than what I am messing about with plugins.

    Anyway, I am here and I am just about to do your last suggestions so bare with me (it’s 12.10am!)

    I’m not sure about those pugins. Like I said, I usually don’t use them so I wo’t be much help on that part.

    It does look like the menu is working fine now though.

    Thread Starter Boo_77

    (@boo_77)

    Ugg!! I hate that I am going to have to go to bed!

    I got all excited then that we may have got it but it turns out I was on the home page.

    So I love that the Daily Photo now looks the same as the other pages. Thats great. Thank you.

    But if I wanted to call it “Photo Album” how would I go about that (dooce’ daily photo was just an example of the way I invisioned it being set up) I did try to go through and just change every daily photo in to Photo Album but then the entire site didn’t load so I must have done something wrong.

    Then I noticed that I have two of the “daily photo” tags set up with two different photo’s of Dude on them and only one is showing up. It doesn’t have a “previous entry” or “next entry” button to click on either. Is this something we have addressed already and I have gotten wrong??

    I changed that catagory ID number too by the way. It was 28. Does the dash stay?? You had -3. Does it become -28 or just 28.

    I think we’re getting there and I appreciate you sticking around and not getting upset that this is taking so long and I have so many questions and am being needy ??

    I’ll be off to bed soon.

    Thanks

    Boo

    Thread Starter Boo_77

    (@boo_77)

    You know what? I think we’re nearly there!

    All I need now is to make it so that people can scroll through the photo album catagory from that page, and so that the photo album posts don’t show up on my home page.

    I had catagory exclusion (plugin) working before but I think with that new code it’s stopped. Any suggestions?

    It really doesn’t matter if you call the category “daily photo” , “photo album” or “bananas” for that matter. What matters is that you 1) have those posts in only that category and 2) that in this line: $myposts = get_posts('numberposts=1&category_name=daily-photo'); you change “daily photo” to be the right name as well as in this line: <?php if (in_category('daily-photo')) { ?> of the pagination script.

    The previous and next links are in the code:

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

    which needs to be inside the loop and on the single.php.

    On the “-‘ issue, yes you need the dash. It’s basically saying show post minus category 28 in your case. That’s how it excludes a category.

    I know this is a lot to digest.

    Thread Starter Boo_77

    (@boo_77)

    I must be doing something wrong in the single.php file.

    What exactly does it mean to be inside the loop??

    I assumed that it just meant it had to be after the start and before the end. Maybe I am wrong. I already had that code in there.

    In the single.php you’ll see this line near the bottom of the page: <?php endwhile; else: ?> that script needs to be above that line in the code.

    That line is the end of the “if have posts” so at that line it stops. Since the script in reliant on that statement it needs to be inside it.

    Thread Starter Boo_77

    (@boo_77)

    OK I really have to go to bed!!

    I did that. But I don’t think it worked?? I don’t know. My eyes are glazing over at this point.

    </div>
    			<div class="hr"><hr /></div>
    
    	<?php comments_template(); ?>
    
    <?php if (in_category('Photo-Album')) { ?>
    		<div class="navigation">
    <?php previous_post_link('%link', 'Previous in category', TRUE); ?>
    <br />
    <?php next_post_link('%link', 'Next in category', TRUE); ?>
    		</div>
    <?php }; ?>
    
    	<?php endwhile; else: ?>

    Thats what I put.

    I think we’re almost there. I am sorry it’s taken so long. But it’s hard when you’re a beginner. I’ll leave it for the night now and hope that you’re not so sick of me tomorrow that we can try once more to nut it out. Thanks for sticking around…you’re a saint!

    Boo

    (nite nite)

    Thread Starter Boo_77

    (@boo_77)

    Good Morning!!

    So I thought we could sort of start from scratch so that we both know what I have done.

    Here is what I put in the header.php

    <div id="page">
    
    <div id="menu">
    	<ul>
    		<li class="page_item <?php if ( is_home() ) { ?>current_page_item<?php } ?>"><a href="<?php bloginfo('url'); ?>"><?php _e('Home', 'elegant-grunge') ?></a></li>
    		<?php wp_list_pages('title_li=&depth=1'); ?>
    <?php
     global $post;
     $myposts = get_posts('numberposts=1&category_name=photo-album');
     foreach($myposts as $post) :
     setup_postdata($post);
     ?>
    <li class="page_item"><a href="<?php the_permalink() ?>" rel="bookmark">Photo Album</a></li>
     <?php endforeach; ?>
    	</ul>
    	<div class="clear"></div>
    </div>
    
    <div id="header-wrap">

    Here is what I put in single.php

    <?php comments_template(); ?>
    
    <?php if (in_category('Photo-Album')) { ?>
    		<div class="navigation">
    <?php previous_post_link('%link', 'Previous in category', TRUE); ?>
    <br />
    <?php next_post_link('%link', 'Next in category', TRUE); ?>
    		</div>
    <?php }; ?>
    
    	<?php endwhile; else: ?>

    Here is what I have put in functions.php

    <?php
    
    function exclude_category($query) {
    	if ( $query->is_feed || $query->is_home ) {
    		$query->set('cat', '-29');
    	}
    return $query;
    }
    add_filter('pre_get_posts', 'exclude_category');
    
    define("ELEGANT_GRUNGE_FRAME_MAX_WIDTH", 415);

    Oh. Maybe I am missing something. You’ve mentioned it a couple times, the pagination script. Is that page.php?? I haven’t learnt about pagination yet! No, single.php must be where you’re referring to!?

    Am I missing a step here for it to not be working right on the pages??

    Thanks

    okay that’s just weird. I’m doing all kinds of tests on my end and don’t see a reason for it not to be working.

    Can you email me your whole single.php file? alan[at]tugbucket .net

    I’ll load it up and give it a go.

    Boo,

    I think I got it. Go to manage -> categories. Is your Photo Gallery category name “Photo Gallery” or “Photo-Gallery”? Notice the difference between a space or a hyphen. When WordPress checks this request, it is looking for the name you created for the category. So if there is a space and not a hyphen, it needs the space.

    I have a category name HTML/CSS, when I list categories WP changes that to htmlcss. When I try to call this request using htmlcss it fails. When i use the name I created eg. “HTML/CSS” it works. thats the only way I could get it to fail.

    So assuming your category was created as “Photo Gallery” then use this code and see if it works now:

    <?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 }; ?>

    another thing. Notice I changed the class name to “pagenavigation”. I looked at your CSS and there is already a class called “navigation” I think that is the default nav but not sure. Don’t want to have any conflicting styles running rampant.

    Thread Starter Boo_77

    (@boo_77)

    Did you see that?? I think we can put this out of the way now! You did it…you did it! YAY!

    Now, just one more thing. Can we remove the side bars from that page??

    Thread Starter Boo_77

    (@boo_77)

    Also, if I wanted to do another kind of page…or do this same thing with my video’s page, would that work?? Would I just change the details of the code you’ve already given me and add it again?

    And if I wanted these new pages to show up in my “pages” part in the second side bar…is that possible??

    Sweet!

    As for your new question, yep ??

    In your single.php you have this:

    <?php if ( get_option('page_setup') != 'no-sidebar' ) get_sidebar(); ?>

    make that look like:

    <?php if (!in_category('photo gallery')) { ?>
    <?php if ( get_option('page_setup') != 'no-sidebar'  ) get_sidebar(); ?>
    <?php }; ?>

    The exclamation point is PHP’s way of saying “not”.

    Your theme has a repeating background with the stripes so that will still be there. If you want the stripes gone you’ll need to make another image. In your header.php file you can add something liek this:

    <?php if (in_category('photo gallery') && !is_archive()) { ?>
    <style type="text/css">
    .double-right-sidebar div #content-container {
    background-image:url(images/YOUR-NEW-IMAGE.jpg);
    }
    </style>
    <?php }; ?>

    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.

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