Drew Baker
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Template Hierarchy – Pagination – home.php overiding index.phpOK, so how do I achieve this then?
http://www.example.com = template1.php
http://www.example.com/page/2 = template2.phpIf I’m looking at:
http://www.example.comWould the conditional tag is_home be true? If so, what about on:
http://www.example.com/page/2I need a way to have the homepage be different than the pagination pages. I don’t want to have to set a static page as the front page, because the URL’s must stay as http://www.example.com and http://www.example.com/page/2.
Thanks for the help,
DrewForum: Fixing WordPress
In reply to: Template Hierarchy – Pagination – home.php overiding index.phpHey David,
Thanks for that. It still seems unintuitive to me, but if that’s they way it is then that’s the way it is.Thanks!
DrewThanks for this, solved a problem for me. I wonder why I couldn’t I just make my category.php file look like this? :
<?php query_posts('posts_per_page=5'); ?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> Do something <?php endwhile; ?> <?php else : ?> Do something else <?php endif; ?>That would make any category page show all posts from all categories. Strange behavior. I’m using WP 3.0.1.
-Drew
Forum: Fixing WordPress
In reply to: What is the best way to serve 70 galleries/3,000 images?Hey,
I built philsternarchives.com and had to solve the same question. I never found a good way to do it. I ended up using NextGen because it allowed bluk FTP importing of photos, but there is still a lot of clicking that you need to do.Let me know if you find something better!
-Drew
Forum: Fixing WordPress
In reply to: SimplePie mRSS – Get at media:content URL?I figured it out. The confusing thing is that the SimplePie API treats the <media> namespace as <enclosure>.
Forum: Plugins
In reply to: Change Password Form – Outside Dashboard?Viper,
This is great! Thanks.Is there a way to use it twice to allow more sizes? I tried just doubling it up and changing the modifier name, but it doesn’t work like that I suppose.
As a side note, this would be a good note to add into the FAQ on the Plugin page.
Thanks!
Forum: Plugins
In reply to: [Plugin: WordPress Popular Posts] Add class to UL using wpp_start= ?Never mind, I found the answer in another thread. You use this attribute :
wpp_start='<ul class=\"test\">'Forum: Fixing WordPress
In reply to: How to limit tags returned by the_tagsHey VincentvandenHeuvel did you ever figure out how to get this to return just 4 tag links? The example esmi gave just returns words, not links. Thanks.
Forum: Fixing WordPress
In reply to: HTTPS A SINGLE STATIC PAGE?I think this might have been your problem. Yes it’s a mediatemple thing:
http://docs.shopplugin.net/Media_Temple_SSL_Redirect_LoopForum: Fixing WordPress
In reply to: jQuery UI Tabs and wp_enqueue_scriptWorking!!!
It would only work if I do this:
<?php wp_enqueue_script('jquery'); ?> <?php wp_enqueue_script('jquery-ui-core'); ?> <?php wp_enqueue_script('jquery-ui-tabs'); ?> <?php wp_head(); ?> <script type="text/javascript"> jQuery(document).ready(function($){ $(".tabs").tabs(); }); </script> </head>This is because <?php wp_head(); ?> actually calls the script within it. So the jQuery(document).ready(function($){ ends up being called before the script is loaded.
Forum: Fixing WordPress
In reply to: jQuery UI Tabs and wp_enqueue_scriptHey Jorbin,
Thanks for this. Although I still get issues with it.
If i put this code in:<?php wp_enqueue_script('jquery','','','',true); wp_enqueue_script('jquery-ui-core','','','',true); wp_enqueue_script('jquery-ui-tabs','','','',true); ?> <script type="text/javascript"> jQuery(document).ready(function($){ $(".tabs").tabs(); }); </script>The code scripts get loaded in my BODY. I think it’s because of the Event calender 3 plugin I have, as they scripts are loaded right above that plugin. But I though the last ‘true’ attribute forced the scripts into the header?
Forum: Fixing WordPress
In reply to: How to strip shortcodes if on index.php?Michael,
That’s amazing. I really have to learn PHP, you can do so much with it!Thanks a lot!
DBForum: Fixing WordPress
In reply to: How to limit tags returned by the_tagsHey esmi,
I tried something like this but only got one tag returned. Any help? My PHP sucks.<?php $posttags = get_the_tags(); $count=0; if ($posttags) { foreach($posttags as $tag) { $count++; if (4 == $count) { echo $tag->name . ' '; } } } ?>Thanks!
Forum: Fixing WordPress
In reply to: How to strip shortcodes if on index.php?Hey Micheal,
Thanks so much for your detailed response.I think the below code is the correct code for going through my home.php file, and stripping all shortcodes except for the posts that are in cat=438 (my video highlight category). But it gives a syntax error saying the ‘else’ line is bad. Like I said, my PHP sucks so any suggestions are greatly appreciated.
function remove_shortcode_from_index($content) { if ( in_category('438') ) { $content = $content; } return $content; } else ( is_home() ) { $content = strip_shortcodes( $content ); } return $content; } add_filter('the_content', 'remove_shortcode_from_index');Thanks!