thelumberjack
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: vbulletin Login in SidebarI have tried it, yes. It doesn’t work with vBulletin 4+.
I found a solution to this anyway. I just needed to pull the hash out and store it as a variable for reuse.
Thanks.
Forum: Fixing WordPress
In reply to: Exclude Category From Categories Widget Without Editing Core FilesThanks, dude. Will have a read through it all now.
Forum: Fixing WordPress
In reply to: Exclude Category From Categories Widget Without Editing Core FilesThanks. I worked out my variable issue with a little bit of tinkering.
??
So what you’re saying is, if you were to copy over a function from the core file, edit it to your liking and paste it into your theme’s functions.php file, basically it would overwrite the default one? Or am I completely missing the point?
Forum: Fixing WordPress
In reply to: Archive Pagination goes wrong after few page.Damn. I had a very similar problem and the code I pasted worked for me. Best of luck with finding a solution!
Forum: Fixing WordPress
In reply to: Archive Pagination goes wrong after few page.Try replacing your query with the following code:
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $args= array( 'showposts' => 10, 'paged' => $paged ); query_posts($args); if (have_posts()) : while (have_posts()) : the_post(); ?>
Forum: Fixing WordPress
In reply to: Exclude Category From Categories Widget Without Editing Core FilesHi, dgwyer.
I tried to change it to
$query->set('cat', '-$variable');
and it failed. Any other ideas? To me it seems like a simple PHP mistake on my end – I’m not exactly a PHP expert at the moment. It’s not a problem with the variable, as I’ve echoed it and it returns a value of 8 (the category I’m trying to exclude).As for the hook, this theme will be available for download, so unfortunately I’m unable to edit WordPress’ core files. Thanks for your help though, much appreciated.
Forum: Fixing WordPress
In reply to: Exclude Category From Categories Widget Without Editing Core FilesThanks, Samuel. How would I go about replacing the ID number with a variable in the following code?
function exclude_category($query) { if ( $query->is_feed ) { $query->set('cat', '-5'); } return $query; } add_filter('pre_get_posts', 'exclude_category');
I want to replace the 5 with $variable but the normal methods don’t seem to be working?
Forum: Fixing WordPress
In reply to: Centering Video for all browsers and screen sizes?Open your CSS file.
Find:
#page-content { border: 10px solid #000000; margin: 70px 355px auto; width: 640px; }
Replace with:
#page-content { border: 10px solid #000000; margin: 0 auto; width: 640px; }
Eat sandwiches, kick back, relax.
Forum: Installing WordPress
In reply to: How to copy all wodpress data within siteTry exporting all of your data through phpMyAdmin and then importing it back into a fresh installation of WordPress (local or no). This will identify or eliminate that it’s a templating/file issue.
Forum: Themes and Templates
In reply to: Problem With Dropdowns in WordPress 3.0 MenuSolved. Was completely CSS related.
Forum: Fixing WordPress
In reply to: Problems With get_bloginfoThanks so much, it worked.
You my friend are a freakin’ Godsend!
Forum: Fixing WordPress
In reply to: Loop not working. Nothing is showing up.You need to add other functions. Here is a basic loop. Feel free to replace your own with this one.
<!-- start the loop --> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> <?php the_excerpt(); ?> </div> <?php endwhile; else: ?> <p>Sorry, no posts matched your criteria.</p> <?php endif; ?> <!-- end the loop --> <!-- get pagination --> <?php get_template_part( 'pagination' ); ?>
Forum: Fixing WordPress
In reply to: Adding a logoI assume you need to locate the image in your header.php file. This should be inside your theme’s folder.
Forum: Plugins
In reply to: [OptionTree] [Plugin: OptionTree] Default form values?Try this instead:
$otest = get_option_tree( 'twitter' ); if ($otest == "") { echo("th3lumberjack"); }
$otest is simply a variable for testing the result.
Forum: Plugins
In reply to: [OptionTree] [Plugin: OptionTree] Default form values?I know I’m a little bit late to the party, but I thought I’d drop in some code that may prove handy for anybody looking for a way to set actual default values on their options.
So here is how to display an option in your template (I’m using a Twitter account as the option for this example):
if ( function_exists( 'get_option_tree' ) ) { get_option_tree( 'twitter', '', true ); }
To display a default value, simple drop this line of code underneath and edit accordingly:
[EDIT] Hold that thought. I found an error in my code.
Now, if a value is not set, it will default to “th3lumberjack”. Hopefully somebody out there finds this useful.
: )