creativelifeform
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: get_the_category questionHi design_dolphin, thanks for the reply.
Are you placing this code in the template file? If I use this and echo $parent_name, nothing happens.
My code works fine except for 2 instances. The first is if the sub category’s name is placed before the parent category’s alphabetically, the second is within the actual post, for some reason a completely random category, unrelated to any of the posts is being returned.
Can’t really understand why this is happening…
Forum: Fixing WordPress
In reply to: Different category post templates with term_slug ???Haha yeah that worked…I thought I tried it already but I guess not! Thanks a lot.
Forum: Fixing WordPress
In reply to: get_the_category questionOkay a slight refinement and a weird nuance. First the refinement:
<?php $category = get_the_category(); if(count($category) >=1) { $parent = get_cat_name($category[0]->parent); } else { $parent = $category[0]->name; } echo $parent; ?>
Now, the nuance. I have a category; Procedures, and a sub category, Regenerative Procedures. So the structure is like
Procedures -> Regenerative Procedures.
For some reason this was the only category where this code was not working. I figured out that this was due to the fact that alphabetically, Regenerative comes after Procedures, because all the other sub categories start with letters before “P”. Is WordPress really organizing these based on ABC? A bit strange…
Forum: Fixing WordPress
In reply to: get_the_category questionAh!
Okay I think I’ve sorted out my problem. Here is the new code I am using. Check it out and let me know what you think
<?php $category = get_the_category(); if(count($category) >=2) { $parent = get_cat_name($category[0]->parent); } else { $parent = $category[0]->name; } echo $parent; ?>
Forum: Fixing WordPress
In reply to: get_the_category questionHi MichaelH, thanks for the response.
Unfortunately, I need to get the category of a post within the single.php file, outside of the loop.
Also I simply can’t understand the logic behind my code returning Practices, that category has nothing to do with the post, so why would that get returned in any instance?
Forum: Fixing WordPress
In reply to: The Loop and orderby=IDAh, order=ASC.
Forum: Fixing WordPress
In reply to: Different category post templates with term_slug ???Its okay I guess, I’m using the ID, no big deal. Might be cool to edit that code to take slugs. Will work on it.
Forum: Fixing WordPress
In reply to: Get posts from specific category in dated orderHi MichaelH, thanks for that. I did it using modulus. Works like a charm, thanks anyway!
Forum: Plugins
In reply to: Best social media plugin?Oh cool, what plug in is that for the digg button?
Thanks again!
Forum: Plugins
In reply to: Best social media plugin?Ah okay that seems okay…but can you change the graphic easily? Also the Add to digg button, is that a different plugin or part of the same one?
Thanks for your help ??
Forum: Your WordPress
In reply to: Creativelifeform launches! Site and Blog now up.Thanks a lot guys! Tymayn I am doing it with CSS.
Forum: Your WordPress
In reply to: Creativelifeform launches! Site and Blog now up.Thanks Trixoo!
Forum: Fixing WordPress
In reply to: Server permissions and image insertionYargh.
I fixed this problem. I had it set to this
/wp-content/uploads
when it should have simply been
wp-content/uploads
huge bad on my part
Forum: Fixing WordPress
In reply to: Server permissions and image insertionOkay I’ll try 777, I really don’t understand why the /wordpress folder is still being created…
Forum: Fixing WordPress
In reply to: Server permissions and image insertionah, umm, sorry…I didn’t have a subdomain, just a subdirectory, my initial post was a bit hasty. So yeah it was just a sub folder. But this problem is still happening…