wmburke
Forum Replies Created
-
Forum: Plugins
In reply to: [Visual Form Builder] What format is the form data stored in?Aha!! I got it.
It’s just serialized php values. Sometimes asking the questions publicly is all it takes to help things make sense.
Forum: Fixing WordPress
In reply to: Explanation and workaround for error 404 on category paginationMy apologies, but my solution above did not fix my problem. Setting the main query to 10 posts per page in functions.php caused the same problem as setting it in the back end.
Didn’t want anyone else to be confused by this.
Forum: Fixing WordPress
In reply to: Explanation and workaround for error 404 on category paginationBrilliant, mate – thanks.
My situation is somewhat less complicated so I used the info on the following page to just reset the main query to 10 posts per page after setting the back end to 1 post per page. This seems to have solved all of my problems (well, related to this specific issue of course ;).
I apologize for the confusion on this – I am using the ‘Subpages Navigation’ plugin, not the ‘Sub page navigation Widget’.
I clicked that it worked since I was on the site and then realized that it was the wrong widget. I tried to find a way to unclick, but couldn’t. However, when I clicked that it didn’t work, it gave me the option to explain, so I figured that was at least more honest.
Sorry for the confusion, I’ll click it back to working based on your assurance.
Forum: Fixing WordPress
In reply to: rewrite probs – mediawiki subdirectory under wordpressThank you for this solution. I was struggling with integrating the two .htaccess necessities as well.
Forum: Plugins
In reply to: [Plugin: Statrix] Can’t Exclude UsersI seem to have this same issue. Is there a solution that didn’t get posted?
Thanks.
Forum: Plugins
In reply to: [Plugin: Statrix] fatal errorI had this same error, Member111, even after trying everything recommended above. However, I managed to solve the problem!
Instead of placing a new .htaccess in the statrix subdirectory, I added the
AddType application/x-httpd-php5 .phpline to the .htaccess file in the main wordpress directory.I don’t know enough about .htaccess files to know if it matters, but as a 1and1 customer, I used their recommended format for that line also:
AddType x-mapp-php5 .phpHope this is helpful to someone!
Forum: Themes and Templates
In reply to: Display link category description???Just in case anyone’s looking for this, the following calls the link category description text from the database:
<?php $link_cat_desc = $wpdb->get_var("SELECT wp_term_taxonomy.description FROM wp_term_taxonomy WHERE wp_term_taxonomy.term_id=107") ?>Of course, you should change the term_id at the end to whatever category ID from the Blogroll>Category page that you want to use.
And then where ever you want to use it, just call it like this:
<?php echo $link_cat_desc; ?>That’s all I’ve got. Happy WordPressing!
Forum: Themes and Templates
In reply to: limit displayed links by two categoriesThanks – got it!
It has taken a bit of SQL learning, but here’s the code that I’m using to limit the links that are displayed to just that fit into two specific categories:
<?php $link_list = $wpdb->get_results(SELECT wp_links.link_name, wp_links.link_url, wp_links.link_description, wp_links.link_notes FROM wp_links WHERE wp_links.link_name IN ( SELECT wp_links.link_name FROM wp_links INNER JOIN wp_term_relationships ON wp_links.link_id = wp_term_relationships.object_id INNER JOIN wp_term_taxonomy ON wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id WHERE wp_term_taxonomy.term_id = '100' ) AND wp_links.link_name IN ( SELECT wp_links.link_name FROM wp_links INNER JOIN wp_term_relationships ON wp_links.link_id = wp_term_relationships.object_id INNER JOIN wp_term_taxonomy ON wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id WHERE wp_term_taxonomy.term_id = '107' ) ORDER BY wp_links.link_notes ASC "); foreach ($link_list as $link_list) {?> <li><a href="<?php echo $link_list->link_url ?>"><?php echo $link_list->link_name?></a> <?php echo $link_list->link_description ?></li> <?php } ?>Now, I know it looks ugly, but here’s what you need to know to put it together.
- You need to familiarize yourself with the WordPress Database Tables – you can do that from the codex here, although it really helped me to use PHPMyAdmin also. This is also intensely useful for verifying that the SQL Query (everything from Select to ASC) works right.
- The SELECT statement right at the beginning specifies what variables get returned from the links database – you can see that I’m only using the name, URL, and Description.
- The section following the first WHERE statement contains multiple selection criteria. The first says that the link must be contained within category ’98’. The second says that the link must be contained within category ‘105’. And the two are connected by an AND statement (You could also use an OR, although this would be easier done with wp_list_bookmarks unless you something complicated).
- ORDER BY is the term that the returned list is ordered by (obvious, right?) sorted in ASCending or DESCending order.
- The output is just customized html – I made them as list items for my use.
That’s it – I hope it’s useful to someone else.
Forum: Themes and Templates
In reply to: Display link category description???Yeah, actually I did try that — the difficulty is that the description that they’re talking about there is for the links, and not for the category. It seems that the link category description is a casualty of the changes that occurred in categories during the switch to 2.3 (if I’ve understood some of the other posts I’ve read).
I think I’m just going to use the Improved Include Plugin and put the text that I was hoping to house in the link category description in a separate page — this will no doubt simplify it for the authors of the site content, anyway.
Thanks for your help — I imagine that there is a way with PHP to call any data out of the database, but I’m not sufficiently sophisticated, so I’ll save that battle for another day.
Wayne
Forum: Themes and Templates
In reply to: Display link category description???Hey SmallPotato,
Thanks for the quick reply. Maybe I’m just missing something obvious, but I get no results from this code – just as I didn’t from what I was trying before.
I’m not putting this in the loop, so my actual code is:
<?php if ( !(”== category_description(89)) ) : echo apply_filters(‘archive_meta’, category_description(89)); endif; ?>
Just in case I wasn’t clear, I’m trying to display the description from a link category – not from a post category.
Maybe it just can’t be done???