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 plugin needed (https://gfy.com/showthread.php?t=889332)

Mike Semen 02-21-2009 01:53 PM

Wordpress plugin needed
 
I'm sure one of you geniuses knows this, and I'm almost sure its out there.

I need a plugin that shows an element (widget if needs be) in the sidebar dependent on category. So I can basically have a bit of the sidebar that only shows for categiry "lesbians" for instance.

Cheers

candyflip 02-21-2009 01:54 PM

http://www.quickonlinetips.com/archi...press-widgets/

http://wordpress.org/extend/plugins/widget-logic/

who 02-21-2009 01:56 PM

I need to fuck a five-foot, 90lbs blonde chick in the ass, so what...?

fris 02-21-2009 02:00 PM

easy to do

Angry Jew Cat - Banned for Life 02-21-2009 02:01 PM

doable manually for anywhere in the theme with conditional includes, not sure how to go about doing it with a plugin or widget though.

Mike Semen 02-21-2009 02:02 PM

Thanks Candyflip, looks like the second one is what I need. The plugin home is down but eh will give it a go.

Angry Jew Cat - Banned for Life 02-21-2009 02:05 PM

Code:

<?php if (is_home('')) : ?>
include this shit only on index page
<?php endif; ?>

<?php if (is_category('category-one') ) : ?>
include this shit only on category with category slug "/category-one/"
<?php endif; ?>

conditional includes are much more flexible than just these examples and you can lookup more info on codex.wordpress.org

Mike Semen 02-21-2009 02:07 PM

thanks Jew Cat! Have a feeling that may get complicated if there's 200 different bits to include...

Mike Semen 02-21-2009 02:08 PM

Quote:

Originally Posted by who (Post 15532295)
I need to fuck a five-foot, 90lbs blonde chick in the ass, so what...?

Don't we all?:(

Machete_ 02-21-2009 02:11 PM

Quote:

Originally Posted by Angry Jew Cat (Post 15532327)
Code:

<?php if (is_home('')) : ?>
include this shit only on index page
<?php endif; ?>

<?php if (is_category('category-one') ) : ?>
include this shit only on category with category slug "/category-one/"
<?php endif; ?>

conditional includes are much more flexible than just these examples and you can lookup more info on codex.wordpress.org


Great simple stuff - this is why I wish I could code myself

Angry Jew Cat - Banned for Life 02-21-2009 02:11 PM

Quote:

Originally Posted by Mike Semen (Post 15532339)
thanks Jew Cat! Have a feeling that may get complicated if there's 200 different bits to include...

yes, this might not be the most efficient means to achieve your goal if you have 200+ categories, heh.

personally i'd just create a seperate .php document with all my includes sorted within it. then include the conditions.php or whatever into the sidebar.php beyond that for organization. but if one of these plugins works for you, post back to the thread. i wouldn't mind looking it over.

Mike Semen 02-21-2009 02:12 PM

Quote:

Originally Posted by Angry Jew Cat (Post 15532359)
yes, this might not be the most efficient means to achieve your goal if you have 200+ categories, heh.

Yea hence the idea of using widgets. We shall see if I can make it happen :D

Mike Semen 02-21-2009 02:14 PM

Jewcat just saw your edit... will do :)

Doctor Feelgood 02-21-2009 07:23 PM

Quote:

Originally Posted by Angry Jew Cat (Post 15532327)
Code:

<?php if (is_home('')) : ?>
include this shit only on index page
<?php endif; ?>

<?php if (is_category('category-one') ) : ?>
include this shit only on category with category slug "/category-one/"
<?php endif; ?>

conditional includes are much more flexible than just these examples and you can lookup more info on codex.wordpress.org

but then it still shows up on page 1,2,3 etc
then i tried this and almost had it, but nothing shows

Code:

<?php if (is_home ('') and is_page ('')) : ?>
include this shit only on index page
<?php endif; ?>


uno 02-21-2009 07:33 PM

Quote:

Originally Posted by Angry Jew Cat (Post 15532359)
yes, this might not be the most efficient means to achieve your goal if you have 200+ categories, heh.

personally i'd just create a seperate .php document with all my includes sorted within it. then include the conditions.php or whatever into the sidebar.php beyond that for organization. but if one of these plugins works for you, post back to the thread. i wouldn't mind looking it over.

I'd probably do that too or have a subdir with various php files for various functions.

uno 02-21-2009 07:35 PM

if/elseif

Angry Jew Cat - Banned for Life 02-21-2009 07:42 PM

Quote:

Originally Posted by Doctor Feelgood (Post 15533195)
but then it still shows up on page 1,2,3 etc
then i tried this and almost had it, but nothing shows

Code:

<?php if (is_home ('') and is_page ('')) : ?>
include this shit only on index page
<?php endif; ?>


you know you got me stumped too, i played with it a bit and couldn't figure it out for myself either. i never really thought to use it in such a way. though i am sure there could easily be a way out there to work it. the wordpress forums are packed with very wordpress knowledgeable folk who i'm sure could answer this for you if it is in fact doable. they always come through for me in tight spots...

dial 02-21-2009 07:43 PM

Angry Jew Cat, do you do custom wordpress code work? would love to have a contact in that area, I always have client asking for custom plugins

Angry Jew Cat - Banned for Life 02-21-2009 08:00 PM

Quote:

Originally Posted by dial (Post 15533242)
Angry Jew Cat, do you do custom wordpress code work? would love to have a contact in that area, I always have client asking for custom plugins

my days of being other people's wordpress grunt are done. and honestly since i moved over to doing mainstream stuff i pretty much grab templates now. spending less of my time on the design aspect and more on getting the sale through. so i'm kind of slacking a bit now in that department. anything new i pick up wodpress-wise now is out of my own necessity or just interest trying somehting new. i wouldn't consider myself a professional in the field by a long shot. intermediate-advanced maybe, lol. better things i can do with my time.

Angry Jew Cat - Banned for Life 02-21-2009 08:04 PM

Quote:

Originally Posted by Angry Jew Cat (Post 15533298)
better things i can do with my time.

actually thats a total lie, i've been parked on my ass doing dick all for the entire day. :1orglaugh i'm kind of pissed off that i'm stumped here and am probably gonna dig into this now. i don't really understand what good it would be for.

i'm thinking if you want something first page only, why not just put it in a sticky post and tack it right at the top of the index?

czarina 02-21-2009 08:06 PM

Quote:

Originally Posted by Angry Jew Cat (Post 15532327)
Code:

<?php if (is_home('')) : ?>
include this shit only on index page
<?php endif; ?>

<?php if (is_category('category-one') ) : ?>
include this shit only on category with category slug "/category-one/"
<?php endif; ?>


something like this is what I was going to suggest. It works great and you dont depend on a plugin (which may end up not being compatible with the next version of WP)

Doctor Feelgood 02-21-2009 08:46 PM

Quote:

Originally Posted by Angry Jew Cat (Post 15533309)
actually thats a total lie, i've been parked on my ass doing dick all for the entire day. :1orglaugh i'm kind of pissed off that i'm stumped here and am probably gonna dig into this now. i don't really understand what good it would be for.

i'm thinking if you want something first page only, why not just put it in a sticky post and tack it right at the top of the index?

haha ive stumped the cat

im thinking some kind of variation of this code
Code:

<?php if (!is_paged()) : ?>
include this shit only on index page
<?php endif; ?>

but instead of 'and' use 'or'
that wont work either
it will come to me in a dream

Angry Jew Cat - Banned for Life 02-21-2009 09:05 PM

Quote:

Originally Posted by Doctor Feelgood (Post 15533413)
haha ive stumped the cat

im thinking some kind of variation of this code
Code:

<?php if (!is_paged()) : ?>
include this shit only on index page
<?php endif; ?>

but instead of 'and' use 'or'
that wont work either
it will come to me in a dream

i'm thinking there's maybe some variation of the is_front_page() tag that would work for this. i'll eventually get around to posting about it on the wordpress forums, i'm curious how to do it myself. i thought is_page_template('index.php') might work, but that didn't seem to cut it either.

i just dunno...

fris 02-21-2009 09:11 PM

Quote:

Originally Posted by Doctor Feelgood (Post 15533195)
but then it still shows up on page 1,2,3 etc
then i tried this and almost had it, but nothing shows

Code:

<?php if (is_home ('') and is_page ('')) : ?>
include this shit only on index page
<?php endif; ?>


Code:

<?php if ( (is_home())&&!(is_paged()) ){ ?>
<h1>this will only be on the index not pages</h1>
<?php } ?>


Angry Jew Cat - Banned for Life 02-21-2009 09:14 PM

Quote:

Originally Posted by fris (Post 15533475)
Code:

<?php if ( (is_home())&&!(is_paged()) ){ ?>
<h1>this will only be on the index not pages</h1>
<?php } ?>


tested and working 100%. should have expected it from gfy's local wordpress freak...

fris 02-21-2009 09:26 PM

Quote:

Originally Posted by Angry Jew Cat (Post 15533485)
tested and working 100%. should have expected it from gfy's local wordpress freak...

Code:

<?php if ( (is_home()) && !(is_page()) && !(is_single()) && !(is_search()) && !(is_archive()) && !(is_author()) && !(is_category()) && !(is_paged()) ) { ?>
<h1>this is really the index page this time seriously</h1>
<?php } ?>


dial 02-21-2009 09:32 PM

Quote:

Originally Posted by Angry Jew Cat (Post 15533298)
my days of being other people's wordpress grunt are done. and honestly since i moved over to doing mainstream stuff i pretty much grab templates now. spending less of my time on the design aspect and more on getting the sale through. so i'm kind of slacking a bit now in that department. anything new i pick up wodpress-wise now is out of my own necessity or just interest trying somehting new. i wouldn't consider myself a professional in the field by a long shot. intermediate-advanced maybe, lol. better things i can do with my time.

cool. i just need someone that can work with me doing custom plugins, all mainstream work, with mainstream level pay

Angry Jew Cat - Banned for Life 02-21-2009 09:43 PM

you don't happen to know a way to assign includes to specific pages in your general posting pagination would you?

Tsang 02-21-2009 09:57 PM

Thanks for the code. Very useful!

fris 02-21-2009 10:03 PM

Quote:

Originally Posted by Angry Jew Cat (Post 15533538)
you don't happen to know a way to assign includes to specific pages in your general posting pagination would you?

not sure if i understand you, you want to include a file say for only /page/2/ and not /page/3/

?

Angry Jew Cat - Banned for Life 02-21-2009 10:23 PM

Quote:

Originally Posted by fris (Post 15533574)
not sure if i understand you, you want to include a file say for only /page/2/ and not /page/3/?

exactly. it's not really anything i have any particular use for atthe moment, just curious while we're somewhat on topic if it's doable also? to say have a seperate banner on the index, page/1/, page/2/ and so forth. i know you could just stick a rotator in there, i'm speaking theoretically if you wanted to do this.

fris 02-22-2009 10:04 AM

Quote:

Originally Posted by Angry Jew Cat (Post 15533611)
exactly. it's not really anything i have any particular use for atthe moment, just curious while we're somewhat on topic if it's doable also? to say have a seperate banner on the index, page/1/, page/2/ and so forth. i know you could just stick a rotator in there, i'm speaking theoretically if you wanted to do this.

this is a way to do it

add this to functions.php

Code:

function do_pageads() {
        global $paged;
        if(!$paged) include (TEMPLATEPATH . '/front_ads.php');
        else include (TEMPLATEPATH . '/other_ads.php');
}

sample index.php

Code:


<?php get_header(); ?>

<div id="content" class="narrowcolumn">

<?php if (have_posts()) : ?>
<?php $count = 0; ?>
<?php while (have_posts()) : the_post(); ?>

<?php $count++; ?>

<div class="entry">
<?php the_content(); ?>
</div>

<?php if ($count == 2) : ?>
<?php do_pageads(); ?>
<?php endif; ?>

<?php endwhile; ?>

<?php endif; ?>

</div>

<?php get_sidebar(); ?>

<?php get_footer(); ?>

this will add your page ad after every 1st post on each page, calling the frontpage_ads or other_ads, add as many as you want.


All times are GMT -7. The time now is 09:53 PM.

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