dave_merwin
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Random <br /> Instead of Content when using get_postsIt does not matter what the variable name is. As long as it doesn’t conflict with the wp. CHanging the variable name or changing the category does not matter. It IS querying the database. It is returning a result. The problem is with the_content. So, again, does anyone else have any ideas why it would render a random
<br />
?Lemme know.
Forum: Fixing WordPress
In reply to: Random <br /> Instead of Content when using get_postsThat is what I am getting at. I use the same loop several times in the page in different sections. Exactly the same. And this is the one place that it goes wrong. All your test will accomplish is knowing that a loop will work. It won’t address why this one is failing.
Forum: Fixing WordPress
In reply to: Random <br /> Instead of Content when using get_poststhe loop works. It is pulling the title from the correct post. I document that in my post. Unless I am missing what you are saying.
Forum: Fixing WordPress
In reply to: Random <br /> Instead of Content when using get_postsWhy would I do that? That doesn’t make any sense for what I want to do.
Forum: Fixing WordPress
In reply to: Using get_post and wrong posts showing up after initial useSolved my own issue
https://www.davemerwin.com/2006/09/11/get_post-and-getting-the-variable-stuck/
Forum: Fixing WordPress
In reply to: Grab the Child Cat Name and Display ItGood thought but that will not work. The wp_list_cats displays a list an dteh argument “child_of” simply displays a list of cats from a parent. Not quite what I had in mind. Thanks though.
I think I am going to have to run a custom query.
Forum: Plugins
In reply to: Displaying the category children of ONE categoryOops Sorry. Try this…
<ul>
<?php
$get_children = $wpdb->get_results('SELECT * FROM your category table WHERE category_parent = "The cat_ID of the parent that you want"');
foreach ($get_children as $child) {
echo '<li><a href="./?cat='.$child->cat_ID.'" title="View all posts filed under '.$child->cat_name.'">'.$child->cat_name.'</a></li>';
}
?>
</ul>I used it as a side bar to display the children of a parent category. It generates a list of the children of the parent.
Forum: Plugins
In reply to: Find Category ID of post, see if it equals 20, then do somethingPerfect… worked like a dream. Thanks.
Forum: Plugins
In reply to: Display “n” number of posts offsetAlso, you will get an error in the above if the query produces no result.
Forum: Plugins
In reply to: Display “n” number of posts offsetoops. Thanks again miklb.
Forum: Plugins
In reply to: Display “n” number of posts offsetThanks miklb.
Here is the answer:
$posts=get_posts('numberposts=2&offset=2&category=30');
Forum: Plugins
In reply to: Looking fro a themeurl like siteurlget_stylesheet_uri
works but, it does the same thing, it bumps the info outside of thea href
. This is SO wierd.Forum: Plugins
In reply to: Looking fro a themeurl like siteurlI was doing this:
bloginfo('stylesheet_directory')
that garbs the right directory but for some reason does not go in thea href
, but gets bumped out. It is wierd.Forum: Plugins
In reply to: Profile PluginBy the way, I have searched google and the plugins directory.
Forum: Plugins
In reply to: Listing Posts in a CategoryOk, found the answer myself. I am VERY happily using the plugin from code2coffee.
https://www.coffee2code.com/archives/2004/08/27/plugin-customizable-post-listings/