Detail: Feed configuration https://www.marinelligroup.eu/screenshot-1.png
#Feed URL: https://www.marinelligroup.eu/wp-content/uploads/woo-feed/google/xml/shopping.xml
see screenshot https://www.marinelligroup.eu/screenshot-2.png
#Product configuration (in example, but it is an error on the entire catalog)
see screenshot: https://www.marinelligroup.eu/screenshot-3.png
We have cleaned the cache on plugin/site/server/browser -> the problem persists
The defect is extended to the entire catalog (for some products the Parent category is filled in)
The products in the shop are all filled in the same way (with the flag on the parent category + sub-category + child category)
What could it depend on?
WP v 6.6.2
Woo v 8.9.3
CTX plugin Latest version
Regards
Giuseppe
]]>I have one product under two subcategories. As a result, the wrong subcategory is getting displayed under a category.
E.g.
My Category & Sub-category are-
Accesories>> Earring
Gift>> Gift for Her.
I have one product under two subcategories – Earring & Gift for Her.
So, when I am opening Accessories category page on my website, then under Product Category filter both Earring & Gift for Her are showing.
Is there a way to show only Earring in Accessories page and not Gift for Her? or I am doing something wrong. I hope I have explained the issue clearly.
Thanks
Subrata
I would like to order the categories in post-filter by category-menu-order. Or is it possible to display it like the order in the shortcode?
I have categories and subcategories and I would like to show them in the correct order.
I only know the attributes “name” and “ID”. Are there other attributes?
Thanks for your help!
Sabrina.
I’m using this code to list child categories:
<?
$caats = wp_get_post_terms( $post->ID, 'categoria_produtos');
$customPostTaxonomies = get_object_taxonomies('produtos');
if(count($customPostTaxonomies) > 0)
{
foreach($customPostTaxonomies as $tax)
{
$args = array(
'orderby' => 'name',
'show_count' => 0,
'pad_counts' => 0,
'hierarchical' => 1,
'taxonomy' => $tax,
'title_li' => '',
'child_of' => $caats[0]->parent
);
wp_list_categories( $args );
}
}
?>
is there anything wrong with it? i cant find the problem
]]>Here’s the site: https://newsite.blairshapiro.com
The menu section in question is like this:
Top level menu item:
Work
Dropdown submenu categories:
Interactive
Microsite
Email
Print
Collateral
Direct Mail
Outdoor
Broadcast
I have it now so that when a user clicks on, let’s say, ‘Print’, ‘Print’ stays highlighted…BUT I want both ‘Print’ AND ‘Work’ to stay highlighted. I simply cannot figure out how to get the top level menu item ‘Work’ to stay highlighted too.
Can anyone help?
]]>The template I’m using has the top level parent item a non-link and not a category, and the submenu items are the categories.
Here’s that code from my header:
<li><a>Work</a>
<ul>
<?php wp_list_categories("exclude=$blog_ID&title_li="); ?>
</ul>
</li>
So in this scenario, when you roll over “Work” in the menu, work is not clickable, but you get a drop down submenu with clickable category links, like “interactive,” “email,” “print,” etc. That’s just how the template I’m using is set up.
I know how to make single Home, About and Contact pages dynamically highlight, here’s the php and css I’m using for those:
code:
<li<?php
if (is_page('About'))
{
echo " id=\"current\"";
}?>>
<a href="<?php bloginfo('url') ?>/about">About</a>
</li>
css:
#current a {font-weight:bold;color:#e2007d;}
Here’s my test site:
https://www.newsite.blairshapiro.com
Again, it should be that only the parent menu item, “Work,” stays highlighted when one of the child submenu items OR one of the posts belonging to the particular submenu child is selected. I hope that’s clear.
I think it has something to do with the is_category, in_category and if/else statements as well as the css, but I just can’t put together the right combination to make it work.
I’m sort of a newb, can anyone show me an example of the code and css to use to achieve this?
Any help would be appreciated.
Thanks!
]]>For single post I want to create a conditional to bring in certain sidebars according to the categroy that the post is in.
For example I would like to call in the sidebar_music.php when the post is in either music or a subcategory (child) of music. Music is a section or category of my site and is assigned cat ID 5
Thus the music sidebar would appear in both these cases
https://mysite.com/music/article
https://mysite.com/music/concerts/article
I assume the code would look something like this. I am a novice with PHP so I don’t know the correct syntax but the perintent functions and logic are basically here. My main problem is I do not know how to define the category and ALSO the children of that category within this conditional.
<?php
if(is_category(‘5&&child_of=5’))
include (‘music_sidebar.php’);
elseif (is_category(9&&child_of=9))
include (‘tv_sidebar.php’);
elseif (is_category(8&&child_of=8))
include (‘dining_sidebar.php’);
?>
]]>It’s kind of complex. I’ll try to be as clear as possible.
The Goal:
I want to display only posts from categories that are children of a parent category I have named “Portfolio”.
Now, I figured out how to do this using foreach() and an array defining the category IDs of the children categories I want to display. Like this:
<?php
$children_cats = array(3,6,7); /*3,6,7 are the IDs of the child categories I want to display */
foreach ($children_cats as $my_cats) {
query_posts("showposts=3&cat=$my_cats"); ?>
while (have_posts()) : the_post();
?>
Works like a champ, looping thru the array and displaying posts only from category IDs 3, 6 and 7.
However, I do not want to hard code those category IDs into that array. Over time, the list of categories that are children of Portfolio will be added to and subtracted from by another user. I don’t want to have to recode the template page every time something changes. Therefore, I need some code that will (1) return a list of categories that are children of the Portfolio categories, and (2) loop thru that list to display the category title and posts from each child category.
Just to be clear, the resulting WP page content would look something like this:
Child Category #1 Title
Child Category #1 Post
Child Category #1 Post
Child Category #1 Post
etc
Child Category #2 Title
Child Category #2 Post
Child Category #2 Post
(continuing for as many categories exist as children of the Portfolio category)
I thought I could do this using wp_list_categories, but I go stumped. I’ve been all over the codex, so if you’ve got an idea please talk me through it–don’t send just a link with no explanation or I’m afraid it will be no help!
Thanks! WP is awesome and the WP community is amazing!
-c.
]]>