jumust
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Order Category in PageHi there,
looks like there’s no plugin for this feature, so if you want to use WP as CMS in order to sort the categories shown in the Front Page and not sort only the single posts, you need something different.“My category order” Plugin and “Order Category” Plugin allow you to order the list of categories links in the sidebar. If I use a query in the index.php and order the categories by id, there is a way to connect that plugin to this query and use its drag and drop to move the categories up and down? This is the only idea I thought and I’m trying to figure out….I’m really in trouble.
Please let me know what you think or if you have a better idea.Thanks so much!!!
Forum: Fixing WordPress
In reply to: If the post belongs to the previous Category – no cat namePERFECTTTTT!!!!!
THANKS AGAINForum: Fixing WordPress
In reply to: If the post belongs to the previous Category – no cat nameHow about the Parent Category Page?
Here is the original code:<?php $just_shown = $last_shown; $last_shown = array(); $sep = ''; foreach((get_the_category()) as $category) { $catname = $category->cat_name; if(!in_array($catname,$just_shown)) { $cat = get_categories('parent='.$category->term_id); if(!$cat) { echo $sep . $catname; $sep = ', '; } } $last_shown[] = $catname; } ?>
I tried to change the code with this one:
<?php $just_shown = $last_shown; $last_shown = array(); $sep = ''; foreach((get_the_category()) as $category) { $catname = $category->cat_name; if(!in_array($catname,$just_shown)) { $cat = get_categories('parent='.$category->term_id); if(!$cat) { $output .= $sep . $catname; $sep = ', '; } } $last_shown[] = $catname; } if($output != '') { echo '<div class="sectioncat">' . $output . '</div>'; } ?>
But it repeats the Cat Header even though posts belong to the same cat.
Thanks
Forum: Fixing WordPress
In reply to: If the post belongs to the previous Category – no cat nameSounds Perfect!!!
alchymyth just missed a }Thanks Guys
Forum: Fixing WordPress
In reply to: If the post belongs to the previous Category – no cat nameThanks so much!
I tried the code but it looks like there is an error…Here is what it displays in the browser:
Parse error: syntax error, unexpected T_ENDWHILE in /home/tipsand1/public_html/thingstodoincalifornia.info/wp-content/themes/diarise/index.php on line 186
Any ideas?
I appreciate all your help.
Thanks
Forum: Fixing WordPress
In reply to: If the post belongs to the previous Category – no cat nameHey Alchymyth,
may you edit just a bit your code to show the category header only if it’s the same than previous category, because I have some problem with css. https://www.screencast.com/users/JuriT/folders/Jing/media/d5ca7c8e-b9ae-4d4a-86ac-b92f915d56b3this is the code in my template
<div class="sectioncat"> <?php $just_shown = $last_shown; $last_shown = array(); foreach((get_the_category()) as $category) { $catname = $category->cat_name; if(!in_array($catname,$just_shown)) { $cat = get_category($category->term_id); //new line to show only top level cat name if(!$cat->parent) { echo $catname . ' '; } //new if statement } $last_shown[] = $catname; } ?> </div>
Thanks so much
Forum: Fixing WordPress
In reply to: If the post belongs to the previous Category – no cat nameAWESOME!!!
It looks like is working very well, but I’m testing it out again….if I have any doubts I’ll ask you.
Anyway if you’d like to take a look, the link to the site is https://thingstodoincalifornia.info/southbay
Actually the category structure is a little confused because I’m still working on it and thinking what’s the best structure.I really appreciate your help. You were pretty kind and helpful. Hope there are a lot of people like you.
THANK YOU VERY MUCH
Forum: Plugins
In reply to: [Multipost MU] [Plugin: Multipost MU] Featured Image supportI need this feature too. How to duplicate featured image and custom field to sub-blogs? It’s so weird if I have to rewrite all of that for each post.
Any new ideas?
Thanks!!!!
Forum: Plugins
In reply to: Broadcast MU vs. Multipost MUHi,
I’d like to merge the plugins so I can post on multiple sites and have all post content, I mean thumbnail and custom fields too. Right now I can post on multiple sites and grab only Title, Cat, Content.I think with the new WP3 Network is necessary have a multipost option which post all the content of a single post. Otherwise it doesn’t make sense if you have to rewrite custom fields and add thumbnail for each post. I could rewrite title, content and cat as well without use these plugins…
Let me know if you guys found a solution that works.
I’m working on a project with more than 10 sites and so many posts so you can understand my need.
Forum: Fixing WordPress
In reply to: If the post belongs to the previous Category – no cat nameHi,
I’m wondering if you can help me again because now I’m in trouble when I change your code.
In the home page I’d like to show only the parent category name:
https://www.screencast.com/users/JuriT/folders/Jing/media/90c5613d-84ce-4367-aeb4-3f9769318308
EX. Medical–>Chiropractic or Shopping–>Bookstores. I want to show only Medical and only Shopping.
If I change your code with get_category_parents it doesn’t work.The other thing regards the Parent Category page. So if I click on Medical Category, in this page I’d like to display the header only with the child category name (or two separated with comma if the post belong to two child categories.) https://www.screencast.com/users/JuriT/folders/Jing/media/1f770215-2719-4c06-ab4a-2709b700bb79
The code is almost the same for the Home page and Category Pages so I think I should change this part of your code:
foreach((get_the_category()) as $category) { $catname = $category->cat_name;
RIGHT?
<?php $just_shown = $last_shown; $last_shown = array(); foreach((get_the_category()) as $category) { $catname = $category->cat_name; if(!in_array($catname,$just_shown)) { echo $catname . ' '; } $last_shown[] = $catname; } ?>
Thanks for all your help.
Forum: Fixing WordPress
In reply to: If the post belongs to the previous Category – no cat nameThat’s GREAT! Thanks for the code and for your explanation, it’s awesome!
It works perfectly, You ROCK!
Thank you so muchForum: Fixing WordPress
In reply to: If the post belongs to the previous Category – no cat nameTHANKS SO MUCH Alchymyth!!!
I think your suggestion to use a variable or array is totally right. But actually I tried, tried…and I can’t figure out this code.
I posted the template here https://wordpress.pastebin.com/iqdaTzTi
and I highlighted the initial part of the tag “box” (within the “box” there is the single post) where you can see the “foreach” to grab the category name.
I hope I was clear, I’m wondering if you can give me other of your valuable suggestions.
ThanksForum: Fixing WordPress
In reply to: how to hide a category name and keep the postsHi Shimu, I have the same issue but your code doesn’t work.
It gives me all the category names in the loop (parent and child) alphabetically ordered and linked. I’d like to have in every posts only the child category and not linked.
Looking forward to having some helps
Thanks so much!Hi ray-zin,
I have the same problem. What do you mean when you say “Instead of creating the subsite with the super site I created it manually in a subdirectory.”
This is the file manager, where should I create a new folder? And won’t it hurt the Network WP3?
https://www.screencast.com/users/JuriT/folders/Jing/media/c07013a6-716f-4570-9acf-5358f3e472fb
and this is the result: grab only the main website https://www.screencast.com/users/JuriT/folders/Jing/media/88a17691-e8b1-4574-9037-4409ef5eba6bLooking forward you to help me.
Thanks so muchJuri