websta
Forum Replies Created
-
Forum: Plugins
In reply to: “Categorical Links Page” plugin not working!? Not working in 2.1, or…?I re-pasted it in, but still just an error. Here is the error:
WordPress database error: [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘AS cat_id, name AS cat_name FROM INNER JOIN ON .term_id = .te]
SELECT DISTINCT .term_id AS cat_id, name AS cat_name FROM INNER JOIN ON .term_id = .term_id AND .taxonomy = ‘link_category’Here is what the plugin has now:
<?php /* Plugin Name: Categorical Links Page Plugin URI: http://www.alucinari.net/wordpress Description: Output links seperated by categories onto a static page (Based on Links Page (http://www.asymptomatic.net/wp-hacks) by Owen Winkler.) Version: 1.1 Author: Jeremy Albrecht Author URI: http://www.alucinari.net/ */ ?> <?php /* INSTRUCTIONS ------------ 1. Upload this file into your wp-content/plugins directory. 2. Activate the Links Page with Categories plugin in your WordPress admin panel. 3. Create a new static page. 4. Add <!--catlinkspage--> to the static page content where you want the links to appear. Enjoy! */ ?> <?php define('LINK_USE_UL', false); function catlinks_page_callback() { global $wpdb; $output = ''; $linkcats = $wpdb->get_results("SELECT DISTINCT $wpdb->terms.term_id AS cat_id, name AS cat_name FROM $wpdb->terms INNER JOIN $wpdb->term_taxonomy ON $wpdb->terms.term_id = $wpdb->term_taxonomy.term_id AND $wpdb->term_taxonomy.taxonomy = 'link_category'"); $output .= '<div class="catlinkspage">'; foreach($linkcats as $cat) { $links = get_links($cat->cat_id, '<li class="clplink">', '</li>', '<br /> >> ', true, 'name', true, false, -1, true, false); if($links) { $output .= '<h2 class="clplinkcategory">' . $cat->cat_name . '</h2> '; $output .= '<ul class="clplinklist"> '; $output .= $links; $output .= '</ul> '; } else { $output .= ''; } } $output .= '</div>'; return $output; } function catlinks_page($content) { if ( strpos($content, '<!--catlinkspage-->') !== false ) $content = catlinks_page_callback(); return $content; } add_filter('the_content', 'catlinks_page'); ?>Forum: Plugins
In reply to: “Categorical Links Page” plugin not working!? Not working in 2.1, or…?Thanks for your response, but I get an error. I deactivated the plugin, changed the text and re-uploaded the file (was worried about line breaks in the plugin editor), and activated the plugin. Now I get the following error at http://growandknow.com/learning/?page_id=12:
WordPress database error: [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘AS cat_id, name AS cat_name FROM INNER JOIN ON .term_id = .te]
SELECT DISTINCT .term_id AS cat_id, name AS cat_name FROM INNER JOIN ON .term_id = .term_id AND .taxonomy = ‘link_category’Thanks, Omarvelous. I guess I would need a more detailed info. I am concerned about messing up the “post templates by category” plugin. I have read the following documentation, but I still can’t figure it out, so maybe I’m just ignorant/retarded:
http://codex.wordpress.org/Template_Hierarchy
Template Hierarchyhttp://codex.wordpress.org/Template_Tags/query_posts
Template Tags & query postshttp://codex.wordpress.org/Displaying_Posts_Using_a_Custom_Select_Query#Query_based_on_Custom_Field_and_Category
Query based on Custom Field and Categoryhttp://wordpress.org/support/topic/38046?replies=53
Display by Category home.php templatehttp://codex.wordpress.org/Category_Templates#Further_Reading
Category Templates: Introductionhttp://wordpress.org/support/topic/121011
Displaying Posts Using a Custom Select Queryhttp://codex.wordpress.org/Stepping_Into_Templates
Stepping into Templateshttp://codex.wordpress.org/The_Loop
The Loophttp://codex.wordpress.org/Theme_Development
Theme Developmenthttp://codex.wordpress.org/Glossary#Query_string
Query stringhttp://codex.wordpress.org/Query_Overview
Query OverviewMoshu, Thanks for the response. I have implemented that plugin already to create the various sub-themes of my site, and tie them to the various major categories.
However, even with the plugin, I still only get a default “single post” page — not one of the several themes. Since the entire site would likely be viewed via single post pages, this would likely be confusing for users.
I assume that I need to make 9 variations of single.php to accommodate this…? Where is single.php is called for? How do I get WP to make that call for a single-post-page divert to the different themes?
Forum: Fixing WordPress
In reply to: Theme doesn’t appear in IE, does in FirefoxDoh! There’s supposed to be a style-ie.css??
Props to podz… problem solved.