Wordpress Coding Help Question?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • smutnut
    So Fucking Banned
    • Jul 2007
    • 5889

    #1

    Wordpress Coding Help Question?

    Just curious if this is something complicated or simple. I want to pull my post up on my index page for 2011 (twentyeleven) theme so that they are laying next to each other about three across. I am about to studio some tube themes to see how they did it, but curious if anyone here knows a simple way to do it with the minimal amount of changes to the code.

    What I'm looking for is a sort of tube script design layout but not really because all the tube designs I see don't size properly to mobile devices like 2011 does (or am I wrong about this?)

    Just curious. Gone through tones of tutorials and have basic understanding of child themes and css, but can't find anything that will just let me alter only the index page like this. Maybe it doesn't work.

    Thanks in advance
  • Mrwww
    Confirmed User
    • Mar 2012
    • 374

    #2
    One sec, ill write the loop for you.


    DattonMedia
    Affordable design and media.
    Daniel Datton
    // ICQ: 9 0 5 9 2 8
    support
    @dattonmedia.com

    Comment

    • Evil Chris
      OG
      • Dec 2001
      • 13248

      #3
      Hit up Derek Smout. He's great at WP. ;)


      It PAYZE to post on GFY

      chris at payze.com | Skype chriswrp

      Comment

      • Mrwww
        Confirmed User
        • Mar 2012
        • 374

        #4
        Code:
        <?php get_header(); ?>
        	<div id="content">
        	<?php 
        		$loop = new WP_Query(array('post_type' => 'portfolio', 'posts_per_page' => 10)); 
        	?>
        	<?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
        	<?php	
        		$custom = get_post_custom($post->ID);
        		$screenshot_url = $custom["screenshot_url"][0];
        		$website_url = $custom["website_url"][0];
        	?>
                <div id="portfolio-item">
        		<h1><?php the_title(); ?></h1>
        		<a href="<?=$website_url?>"><?php the_post_thumbnail(); ?> </a>
        		<?php the_content(); ?>
        	</div>
                <?php endwhile; ?>  
                </div>


        DattonMedia
        Affordable design and media.
        Daniel Datton
        // ICQ: 9 0 5 9 2 8
        support
        @dattonmedia.com

        Comment

        • Mrwww
          Confirmed User
          • Mar 2012
          • 374

          #5
          Line 4:
          Code:
          		$loop = new WP_Query(array('post_type' => 'portfolio', 'posts_per_page' => 10));
          Change the output to the desired amount of posts.


          DattonMedia
          Affordable design and media.
          Daniel Datton
          // ICQ: 9 0 5 9 2 8
          support
          @dattonmedia.com

          Comment

          • smutnut
            So Fucking Banned
            • Jul 2007
            • 5889

            #6
            No problem. Will just break down the index on a tube theme

            Comment

            • Mrwww
              Confirmed User
              • Mar 2012
              • 374

              #7
              Heres how to display it using a custom field, this inst my work, but will integrate with my code.

              Code:
              <?php
              	add_action('init', 'create_portfolio');
              	function create_portfolio() {
                  	$portfolio_args = array(
                      	'label' => __('Portfolio'),
                      	'singular_label' => __('Portfolio'),
                      	'public' => true,
                      	'show_ui' => true,
                      	'capability_type' => 'post',
                      	'hierarchical' => false,
                      	'rewrite' => true,
                      	'supports' => array('title', 'editor', 'thumbnail')
                      );
                  	register_post_type('portfolio',$portfolio_args);
              	}
              ?>


              DattonMedia
              Affordable design and media.
              Daniel Datton
              // ICQ: 9 0 5 9 2 8
              support
              @dattonmedia.com

              Comment

              • smutnut
                So Fucking Banned
                • Jul 2007
                • 5889

                #8
                Originally posted by Evil Chris
                Hit up Derek Smout. He's great at WP. ;)
                Hope he's better than he is at sending out checks

                Comment

                • fris
                  Too lazy to set a custom title
                  • Aug 2002
                  • 55679

                  #9
                  guys he wants posts like a grid ;)

                  twentyeleven isnt made like that, lots of other themes are
                  Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

                  Comment

                  • smutnut
                    So Fucking Banned
                    • Jul 2007
                    • 5889

                    #10
                    Originally posted by fris
                    guys he wants posts like a grid ;)

                    twentyeleven isnt made like that, lots of other themes are
                    Yes, that's what I'm looking for. You can't do that with the index in twentyeleven?

                    Thanks, Fris

                    Comment

                    • 2012
                      So Fucking What
                      • Jul 2006
                      • 17189

                      #11
                      Originally posted by smutnut
                      Yes, that's what I'm looking for. You can't do that with the index in twentyeleven?

                      Thanks, Fris
                      you can. make a child theme, don't ever fuck with your 2011 source. use a counter to build the grid.

                      css example { float:left, width:33% } ( you want three columns per row )

                      happy fun times
                      best host: Webair | best sponsor: Kink | best coder: 688218966 | Go Fuck Yourself

                      Comment

                      • smutnut
                        So Fucking Banned
                        • Jul 2007
                        • 5889

                        #12
                        Originally posted by 2012
                        you can. make a child theme, don't ever fuck with your 2011 source. use a counter to build the grid.

                        css example { float:left, width:33% } ( you want three columns per row )

                        happy fun times
                        last time I tried something similar to this on twentyten, I got the left and the width but the posts didn't jump up beside each other... It's been a while since I tried though. Did I not code for the columns or something.

                        I know twentyeleven has gallery posts and everything now but still can't see a way to squeeze the posts side by side like that even with the css. I'm no pro though.

                        I've done simple stuff like calling and removing headers and sidebars with plug ins through child themes so I can follow along tutorials a little

                        Comment

                        • Colmike9
                          (>^_^)b
                          • Dec 2011
                          • 7230

                          #13
                          There are some themes like that and are dynamic like Tanzaku that I use on www.onlinesexblogs.com
                          Join the BEST cam affiliate program on the internet!
                          I've referred over $1.7mil in spending this past year, you should join in.
                          I make a lot more money in the medical field in a lab now, fuck you guys. Don't ask me to come back, but do join Chaturbate in my sig, it still makes bank without me touching shit for years..

                          Comment

                          • smutnut
                            So Fucking Banned
                            • Jul 2007
                            • 5889

                            #14
                            Originally posted by Colmike7
                            There are some themes like that and are dynamic like Tanzaku that I use on www.onlinesexblogs.com
                            That looks really good, but wouldn't twentyeleven shrink even that banner small for cell phone usage or am I wrong about that? I know it would within a post as well as video players.

                            If you partially close your browser on that theme, sliders are forced at the bottom to see the whole banner. Just curious.

                            Otherwise that's pretty much what I am after.

                            Plus if something would expand for HDTV

                            Plus I would like that to open to normal size posts. I just noticed that the posts it opens to are pretty much the same as what you see on index page

                            Comment

                            • Colmike9
                              (>^_^)b
                              • Dec 2011
                              • 7230

                              #15
                              Originally posted by smutnut
                              That looks really good, but wouldn't twentyeleven shrink even that banner small for cell phone usage or am I wrong about that? I know it would within a post as well as video players.

                              If you partially close your browser on that theme, sliders are forced at the bottom to see the whole banner. Just curious.

                              Otherwise that's pretty much what I am after.

                              Plus if something would expand for HDTV

                              Plus I would like that to open to normal size posts. I just noticed that the posts it opens to are pretty much the same as what you see on index page
                              Yeah, I edited functions.php and it works a little different than default with resizing posts and image size, but the posts fit the whole width of the screen (Press ctrl- and ctrl+ to see) There are other similar themes that resize posts like Tanzaku but I can't remember what they are right now..
                              The banner is also just a big banner that I put up in the top sidebar area, it doesn't have to be that big or there at all.
                              Join the BEST cam affiliate program on the internet!
                              I've referred over $1.7mil in spending this past year, you should join in.
                              I make a lot more money in the medical field in a lab now, fuck you guys. Don't ask me to come back, but do join Chaturbate in my sig, it still makes bank without me touching shit for years..

                              Comment

                              • fris
                                Too lazy to set a custom title
                                • Aug 2002
                                • 55679

                                #16
                                what kind of look you going for? got any examples, i can show you some grid themes if you want.
                                Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

                                Comment

                                • smutnut
                                  So Fucking Banned
                                  • Jul 2007
                                  • 5889

                                  #17
                                  Originally posted by fris
                                  what kind of look you going for? got any examples, i can show you some grid themes if you want.
                                  I'm actually trying to figure out more how it's done than to actually need it at the moment. I like the way twentyten and twentyeleven collapses and stacks on itself. Don't ask me why. I know there's more to it than that, but for my own interest at the moment. I'm curious how it works

                                  Comment

                                  • fris
                                    Too lazy to set a custom title
                                    • Aug 2002
                                    • 55679

                                    #18
                                    Originally posted by smutnut
                                    I'm actually trying to figure out more how it's done than to actually need it at the moment. I like the way twentyten and twentyeleven collapses and stacks on itself. Don't ask me why. I know there's more to it than that, but for my own interest at the moment. I'm curious how it works
                                    here is a post for you

                                    http://www.transformationpowertools....sts-grid-style

                                    also have a look at these, so you can see some grid examples in themes

                                    http://www.eleventhemes.com/gridly-theme/

                                    http://www.dessign.net/grid-portfolio-theme-free/

                                    http://shakenandstirredweb.com/theme/shaken-grid-free

                                    http://mufeng.me/photo/

                                    http://stephpunk.com/blog/?p=2154#3

                                    hope this helps
                                    Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

                                    Comment

                                    • smutnut
                                      So Fucking Banned
                                      • Jul 2007
                                      • 5889

                                      #19
                                      thanks. I will

                                      Actually Mrwww was helping me out too. He's pretty smart about wordpress also. This has something to do with the loop that I can't fully understand yet. I don't really know how to make all those framework themes work the way I want yet either.

                                      Will figure this stuff out though

                                      thanks for your help, Fris. And those plug ins you always post

                                      Comment

                                      • fris
                                        Too lazy to set a custom title
                                        • Aug 2002
                                        • 55679

                                        #20
                                        Originally posted by smutnut
                                        thanks. I will

                                        Actually Mrwww was helping me out too. He's pretty smart about wordpress also. This has something to do with the loop that I can't fully understand yet. I don't really know how to make all those framework themes work the way I want yet either.

                                        Will figure this stuff out though

                                        thanks for your help, Fris. And those plug ins you always post
                                        the first link i posted in here shows you how it stacks the post, with a counter variable.
                                        Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

                                        Comment

                                        • garce
                                          Confirmed User
                                          • Oct 2001
                                          • 7103

                                          #21
                                          Yay. Wordpress. Maor is not better.

                                          Comment

                                          • smutnut
                                            So Fucking Banned
                                            • Jul 2007
                                            • 5889

                                            #22
                                            Originally posted by fris
                                            the first link i posted in here shows you how it stacks the post, with a counter variable.
                                            Thanks again, Fris

                                            yeah, man, that's the one I needed!!!
                                            Last edited by smutnut; 04-23-2012, 03:26 PM.

                                            Comment

                                            • fris
                                              Too lazy to set a custom title
                                              • Aug 2002
                                              • 55679

                                              #23
                                              Originally posted by smutnut
                                              Thanks again, Fris

                                              yeah, man, that's the one I needed!!!
                                              here is a twentyten child theme that has stacked posts. (paid)

                                              only $5 though

                                              http://wpcharity.com/2011/03/21/japa...e-for-charity/

                                              Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

                                              Comment

                                              • smutnut
                                                So Fucking Banned
                                                • Jul 2007
                                                • 5889

                                                #24
                                                Originally posted by fris
                                                here is a twentyten child theme that has stacked posts. (paid)

                                                only $5 though

                                                http://wpcharity.com/2011/03/21/japa...e-for-charity/

                                                This is what I want the site to do. See this site http://free3dlinks.com/

                                                It shrinks down as small as you make the browser. Even the header shrinks. Probably you would have to add some css if you wanted a banner outside the content container to shrink, but even the video play will shrink to the smallest size for even a tiny mobile browser if I had one there.

                                                But I want this with the grid so the grid will probably stack like the menu would do if I had more than just home on there

                                                Comment

                                                • Mutt
                                                  Too lazy to set a custom title
                                                  • Sep 2002
                                                  • 34431

                                                  #25
                                                  damn, where have I been - i've never seen that before where graphics size down when you reduce the size of the browser. is that a jquery plugin? it will do that with a video player too?
                                                  I moved my sites to Vacares Hosting. I've saved money, my hair is thicker, lost some weight too! Thanks Sly!

                                                  Comment

                                                  • BSleazy
                                                    Confirmed User
                                                    • Aug 2002
                                                    • 6721

                                                    #26
                                                    http://www.smashingmagazine.com/2011...gn-strategies/
                                                    icq 156131086

                                                    Comment

                                                    • smutnut
                                                      So Fucking Banned
                                                      • Jul 2007
                                                      • 5889

                                                      #27
                                                      Originally posted by Mutt
                                                      damn, where have I been - i've never seen that before where graphics size down when you reduce the size of the browser. is that a jquery plugin? it will do that with a video player too?
                                                      On this one you can see the vid player size down, but only until gets to the new header that I added with a functions plug in and without the correct code to size it down. Been dicking around with this for a while so that the vid player sizing is the only thing to take note of.

                                                      Problem is though I don't think that vid player shows up on iphone or ipad unless they added an app for it.

                                                      Comment

                                                      • smutnut
                                                        So Fucking Banned
                                                        • Jul 2007
                                                        • 5889

                                                        #28
                                                        Originally posted by smutnut
                                                        On this one you can see the vid player size down, but only until gets to the new header that I added with a functions plug in and without the correct code to size it down. Been dicking around with this for a while so that the vid player sizing is the only thing to take note of.

                                                        Problem is though I don't think that vid player shows up on iphone or ipad unless they added an app for it.
                                                        Oops. Sorry. Forgot to give you a link http://a2011test.feminazichronicles.com/

                                                        Comment

                                                        • smutnut
                                                          So Fucking Banned
                                                          • Jul 2007
                                                          • 5889

                                                          #29
                                                          Originally posted by Mutt
                                                          damn, where have I been - i've never seen that before where graphics size down when you reduce the size of the browser. is that a jquery plugin? it will do that with a video player too?
                                                          http://a2011test.feminazichronicles.com/ this one here will shrink to header for reasons I explained in post where I forgot to leave link

                                                          Comment

                                                          • fris
                                                            Too lazy to set a custom title
                                                            • Aug 2002
                                                            • 55679

                                                            #30
                                                            Originally posted by Mutt
                                                            damn, where have I been - i've never seen that before where graphics size down when you reduce the size of the browser. is that a jquery plugin? it will do that with a video player too?
                                                            twentyeleven does it by default (responsive)

                                                            look for a responsive theme if you wish to do this
                                                            Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

                                                            Comment

                                                            • smutnut
                                                              So Fucking Banned
                                                              • Jul 2007
                                                              • 5889

                                                              #31
                                                              Originally posted by fris
                                                              twentyeleven does it by default (responsive)

                                                              look for a responsive theme if you wish to do this
                                                              I'm looking for one that goes in the other direction too for HDTV. Pretty soon this crap is going to be being watched on you big screen through your internet hook up. Soon like tomorrow morning

                                                              Comment

                                                              Working...