superiorstudio
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: specific pagesSounds like what used to be called a type mismatch error, where you want the code to understand a number but it is seeing a string. Perhaps throwing an (int) in front of your number string as shown here?
Forum: Fixing WordPress
In reply to: specific pagesDunno if it is this simple, but you seem to be missing a closing quotation mark at the end of the page id numbers.
Forum: Plugins
In reply to: Fast way to get latest post’s ID?Thanks so much! That does work, with one small modification: the category I was using was the default category, so page IDs were being mixed in with post IDs and some of the page IDs were higher. So, I created a new category, switched the posts to it, entered the new category ID in your line of code, and it works like a charm! For those who are curious, it is for the navigation bar at http://www.entropiacomics.com
Forum: Plugins
In reply to: Fast way to get latest post’s ID?Uh, that’s all greek to me. Can anyone supply a line of code or modify the following so that the result is the ID of the latest post in a category? Right now I have this, which returns the total number of posts, but not an ID:
$cat_count = $wpdb->get_var(“SELECT category_count from $wpdb->categories WHERE cat_ID = ‘2’”);
Forum: Fixing WordPress
In reply to: Finding ordinal post (not ID) number?Yes, I see what you mean. I will give that some thought, thanks!
Forum: Fixing WordPress
In reply to: Finding ordinal post (not ID) number?Yes, it is the trickier one that I want. 🙂 I can get a post_id no problem.