php – Ttle color based on category wordpress

I need to set post title bg-color based on category color. I have custom made WordPress template (nes blog) and I have colored category tags (sport- green, politivs – red,…). Now I need to set up bg-color of titles based on that category bg-color. For exapmple sport title background green…

magento2.4 – Magento 2.4 – Category Image showing Nan undefined in backend

When I upload category image in backend and save the category, it start reflect on frontend but in backend it is showing broken.

enter image description here

The category image path in frontend /media/catalog/category/image.jpg but in backend, path is showing as

How to resolve it?

How do I turn CPT automatically also into category?

When I create a new post on a CPT I want to automatically turn it also into a category to appear in another CPT.
Example: I have a post type called "School Subject" and when I create the subject "Math" it will appear as category on the CPT called "Exams"

ct.category theory – Category morphisms and structure homomorphisms

Different types of homomorphisms (e. g. group hom.s, vector space hom.s, algebra hom.s) seem to be able to be generalized using two strategies.

  • Either describe the homomorphism class as a class preserving a specific structure (structure-preserving hom.s, the ,,logician’s way”).
  • Or see them as morphisms within a category (the ,,category theorist’s” way).

Are these two approaches always interchangeable or is one more potent than the other? Or do they have each their one expressive abilities not shared by the other one?

Asking this question on math.SE some time ago did not yield results definitely answering my questions, therefore I ask it here.

magento2 – Paging not showing on category view

I am unable to see paging on my category view products.
By default 12 products show and when I add a query string ?p=2 then other page products show.

Here is my setting inside admin panel

enter image description here

I have checked the file.

these two methods also exist responsible to print paging

<?= $block->getToolbarHtml() ?>
<?= $block->getAdditionalHtml() ?>

at.algebraic topology – Proofs that the classifying space of Connes’ cycle category $Lambda$ is $mathbb C mathbb P^infty$

Connes showed in Cohomologie cyclique et foncteurs $Ext^n$ (1983) that the classifying space of his cycle category $Lambda$ is $mathbb C mathbb P^infty = B(S^1) = K(mathbb Z,2)$.

Connes’ proof is not quite as conceptual as one might like. He shows that $|Lambda|$ is simply-connected, and then computes its cohomology via an explicit resolution of the constant functor $Lambda to Ab$, $(n) mapsto mathbb Z$ via a double complex which is cooked-up by gluing together the usual way of resolving cyclic groups and the usual way of resolving simplicial objects, with a few modifications. He’s able to get the ring structure on the cohomology using an endomorphism of this double complex. The result follows because $mathbb Cmathbb P^infty$ is characterized among simply-connected spaces by its cohomology ring.

Surely in the last nearly 40 years new proofs that $|Lambda| simeq mathbb C mathbb P^infty$ have been found.

Question 1: What are some alternate proofs that $|Lambda| simeq mathbb C mathbb P^infty$?

Question 2: (somewhat vague) In particular, is there a proof which somehow uses an explicit $S^1$ action on some category or simplicial set related to $Lambda$?

theme development – Custom post type 404 category page

I created a custom post type called news and a taxonomy for the custom post type called news categories. However, the category page archive returns me 404.

**Register Custom Post Type**

    $labels_noticias = array(
        'name'               => __( 'Notícias' ),
        'singular_name'      => __( 'Notícia' ),
        'add_new'            => __( 'Nova Notícia' ),
        'add_new_item'       => __( 'Nova Notícia' ),
        'edit_item'          => __( 'Editar Notícia' ),
        'new_item'           => __( 'Nova Notícia' ),
        'all_items'          => __( 'Todas as Notícias' ),
        'view_item'          => __( 'Visualizar Notícia' ),
        'search_items'       => __( 'Pesquisar Notícias' ),
        'not_found'          => __( 'Nenhuma notícia encontrada ' ),
        'not_found_in_trash' => __( 'Nenhuma notícia encontrada na lixeira ' ),
    // Argumentos CPT Notícias
    $args_noticias = array(
        'labels'            => $labels_noticias,
        'description'       => 'Contém nossas notícias',
        'taxonomies'        => array('categoria-noticias','noticias-tag'),
        'public'            => true,
        'menu_position'     => 5,
        'menu_icon'         => 'data:image/svg+xml;base64,' . base64_encode($icons_cpt('noticias')),
        'supports'          => $supports,
        'has_archive'       => 'noticias',
        'show_in_admin_bar' => true,
        'show_in_nav_menus' => true,
        'show_in_rest'      => true,
        'query_var'         => 'noticia',
    register_post_type ( 'noticias', $args_noticias );
** Register Custom Taxonomie **

    $labels_categories = array(
        'name'              => _x( 'Categorias', 'taxonomy general name' ),
        'singular_name'     => _x( 'Categoria', 'taxonomy singular name' ),
        'search_items'      => __( 'Buscar Categorias' ),
        'all_items'         => __( 'Todas Categorias' ),
        'parent_item'       => __( 'Categoria Pai' ),
        'parent_item_colon' => __( 'Categoria Pai:' ),
        'edit_item'         => __( 'Editar Categoria' ),
        'update_item'       => __( 'Atualizar Categoria' ),
        'add_new_item'      => __( 'Adicionar nova Categoria' ),
        'new_item_name'     => __( 'Novo nome de categoria' ),
        'menu_name'         => __( 'Categorias' ),
    $args_categories   = array(
        'hierarchical'      => true, // make it hierarchical (like categories)
        'labels'            => $labels_categories,
        'show_ui'           => true,
        'show_admin_column' => true,
        'query_var'         => true,
        'rewrite'           => ( 'slug' => 'noticias' ),

register_taxonomy( "categoria-noticias", $args_categories );

What do I add to specificy another category for a custom header?

This is current code, I’d like one more along the lines of elseif ( is_category(‘new-header-cat’) || is_single() && in_category(‘new-header-cat’) ) :

<?php else: ?>
<div class="main-content">
    <div id="media-header">
        <?php if ( is_singular( 'product' ) ) : ?><img src="<?php get_home_url(); ?>/wp-content/header-images/store-header-CultNEW2.png" alt="Shep's Knowledge Products"/>

        elseif ( is_category('amazing-business-radio-show') || is_single() && in_category('amazing-business-radio-show') ) :
        <img src="<?php get_home_url(); ?>/wp-content/header-images/blog-header-show.jpg" alt="Shep Hyken's Amazing Business Radio"/>

        <?php endif;
        endif; ?>
    <div class="container">

    <?php if ( is_singular( 'product' ) ) : ?><p id="breadcrumbs"> <a href="/">Home</a> | <a href="/online-store/">Store</a> | <strong><?php the_title(); ?></strong></p>
    <?php elseif ( function_exists('yoast_breadcrumb') ) : yoast_breadcrumb('<p id="breadcrumbs">','</p>'); endif;?>

categories – Checking For a Specific Parent Category from Subcategory Page

I want to write some code that checks to see the current category, and then checks to see if it falls under 3 potential parent categories.

So if I had a setup like this:


If I clicked on chocolate, it would check recursively to see if the parent category is Market, Business, or Support, and then display the first level subcategories for that category.

So in the case of chocolate it would check and find “Market” and then display “Food, Produce” in the home subcategory listing.

This is the code I currently have in my theme:

if ( 'jetpack-portfolio' == $type ) {
        $categories_list = get_terms( 'jetpack-portfolio-type' );
    } elseif ( 'portfolio' == $type && ( !class_exists( 'Jetpack' ) || !post_type_exists( 'jetpack-portfolio' ) ) ) {
        $categories_list = get_terms( 'ct_portfolio' );
    } else {
        $currCat = get_queried_object()->term_id;
        $args = array(
            'parent' => $currCat
        $categories_list = get_terms( 'category', $args );

    if ( ! empty( $categories_list ) && ! is_wp_error( $categories_list ) ) {

        if ( ! is_home() ) {
            $term_id = get_queried_object()->term_id; 

        $categories_list_display = '<section id="category-sidebar-filter" class="widget widget_categories"><h2 class="widget-title">Categories</h2><ul>';

            foreach ( $categories_list as $term ) {

                if ( !is_home() && $term->term_id == $term_id ) {
                    $active_class = 'cat-active';
                } else {
                    $active_class = '';

                $categories_list_display .= '<li class="cat-item ' . esc_attr( $active_class ) . '"><a href="' . esc_url( get_term_link( $term ) ) . '">' . $term->name . '</a></li>';


        $categories_list_display .= '</ul></section>';

        printf( $categories_list_display );


wp query – How can I display a category page with future sub categories?

In a recent project I had to build a custom category page.

On this parent category, I display sub categories.(just thumbnail and title)

Some of these subcategories’posts will be published in future.
In subcategory page, I managed, thanks to the answer given here, to display future and published post together and add a special class to future posts, to add an overlay with a message (eg:”coming soon”).

Is it possible to do the same in a parent category with the subcategories thumbnail ?
-display all published and future subcategories (subcategories in which post will be published in future)
-add an overlay on it and make the “future” subcategorie unclickable”..

Thanks for your help..