GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Wordpress Coding Help Question? (https://gfy.com/showthread.php?t=1065642)

smutnut 04-23-2012 07:06 AM

Wordpress Coding Help Question?
 
:helpme 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 :thumbsup

Mrwww 04-23-2012 07:08 AM

One sec, ill write the loop for you.

Evil Chris 04-23-2012 07:08 AM

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

Mrwww 04-23-2012 07:10 AM

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>


Mrwww 04-23-2012 07:11 AM

Line 4:
Code:

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

smutnut 04-23-2012 07:12 AM

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

Mrwww 04-23-2012 07:12 AM

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


smutnut 04-23-2012 07:12 AM

Quote:

Originally Posted by Evil Chris (Post 18903237)
Hit up Derek Smout. He's great at WP. ;)

Hope he's better than he is at sending out checks :1orglaugh

fris 04-23-2012 07:15 AM

guys he wants posts like a grid ;)

twentyeleven isnt made like that, lots of other themes are

smutnut 04-23-2012 07:18 AM

Quote:

Originally Posted by fris (Post 18903253)
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

2012 04-23-2012 09:02 AM

Quote:

Originally Posted by smutnut (Post 18903258)
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 )

:2 cents: happy fun times

smutnut 04-23-2012 09:32 AM

Quote:

Originally Posted by 2012 (Post 18903483)
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 )

:2 cents: 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

Colmike9 04-23-2012 09:51 AM

There are some themes like that and are dynamic like Tanzaku that I use on www.onlinesexblogs.com

smutnut 04-23-2012 10:00 AM

Quote:

Originally Posted by Colmike7 (Post 18903593)
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

Colmike9 04-23-2012 10:13 AM

Quote:

Originally Posted by smutnut (Post 18903615)
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. :winkwink:

fris 04-23-2012 11:23 AM

what kind of look you going for? got any examples, i can show you some grid themes if you want.

smutnut 04-23-2012 11:32 AM

Quote:

Originally Posted by fris (Post 18903768)
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

fris 04-23-2012 12:10 PM

Quote:

Originally Posted by smutnut (Post 18903777)
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

smutnut 04-23-2012 12:16 PM

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 :thumbsup

fris 04-23-2012 12:17 PM

Quote:

Originally Posted by smutnut (Post 18903881)
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 :thumbsup

the first link i posted in here shows you how it stacks the post, with a counter variable.

garce 04-23-2012 12:18 PM

Yay. Wordpress. Maor is not better.

smutnut 04-23-2012 04:25 PM

Quote:

Originally Posted by fris (Post 18903884)
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!!!

fris 04-23-2012 05:02 PM

Quote:

Originally Posted by smutnut (Post 18904478)
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/

http://i.imgur.com/UEBT7.jpg

smutnut 04-24-2012 07:20 AM

Quote:

Originally Posted by fris (Post 18904541)
here is a twentyten child theme that has stacked posts. (paid)

only $5 though

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

http://i.imgur.com/UEBT7.jpg

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

Mutt 04-24-2012 07:28 AM

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?

BSleazy 04-24-2012 07:38 AM

http://www.smashingmagazine.com/2011...gn-strategies/

smutnut 04-24-2012 08:00 AM

Quote:

Originally Posted by Mutt (Post 18905532)
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.

smutnut 04-24-2012 08:19 AM

Quote:

Originally Posted by smutnut (Post 18905607)
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/

smutnut 04-24-2012 08:20 AM

Quote:

Originally Posted by Mutt (Post 18905532)
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

fris 04-24-2012 08:57 AM

Quote:

Originally Posted by Mutt (Post 18905532)
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

smutnut 04-24-2012 10:10 AM

Quote:

Originally Posted by fris (Post 18905773)
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 :1orglaugh


All times are GMT -7. The time now is 11:27 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123