Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter rwebn

    (@rwebn)

    ok… “fun”, it was other thing. the vhost was bad and when we used redirection (for api / json for example), the variable $_GET was erased. so… bugs…

    I learnt a lot with this case. thanks for reading my dispair.

    Thread Starter rwebn

    (@rwebn)

    So after checking
    only the “page” and “post” types have this problem. All the fields registered in custom-post.php do not have this problem.

    I’ve tried a few codes and I saw that the old dev had also tried… but it doesn’t work. For example

    public function add_category_to_pages() {
        register_taxonomy_for_object_type('post_tag', 'page');
        // Add category metabox to page
        register_taxonomy_for_object_type('category', 'page');
    }

    function add_taxonomies_to_post_and_page() {
    global $wp_post_types
    if (post_type_exists('post')) {
        // Récupérer l'objet existant
        $post_obj = $wp_post_types['post'];
    
        if (!in_array('post_tag', $post_obj->taxonomies)) {
            $post_obj->taxonomies[] = 'post_tag';
        }
        if (!in_array('category', $post_obj->taxonomies)) {
            $post_obj->taxonomies[] = 'category';
        }
    }
    if (post_type_exists('page')) {
        $page_obj = $wp_post_types['page'];
        if (!in_array('post_tag', $page_obj->taxonomies)) {
            $page_obj->taxonomies[] = 'post_tag';
        }
        if (!in_array('category', $page_obj->taxonomies)) {
            $page_obj->taxonomies[] = 'category';
        }
    }}add_action('init', 'add_taxonomies_to_post_and_page', 20);

    function ajouter_categories_et_tags_a_tous_les_types() {
    $post_types = get_post_types(array('public' => true), 'names');
    foreach ($post_types as $post_type) {
     
        register_taxonomy_for_object_type('category', $post_type);
        register_taxonomy_for_object_type('post_tag', $post_type);
    }
    }
    add_action('init', 'ajouter_categories_et_tags_a_tous_les_types');

    Elsewhere, I saw someone talking about “wp super cache”, I’ve installed it, I’ve cleared the cache but it doesn’t work… they’re also talking about restarting the server, but I can’t get hold of that, it’ll be restarted tonight. We’ll see tomorrow if this solution is ok, but I doubt about it. ^^

    Thread Starter rwebn

    (@rwebn)

    hum… I reinstall the site with no plug ins and with default theme… And I have still nothing (“extrait” et “commentaire”, in French). :/ I assume it’s in the database but for technical reasons I have a limited access… and I need to keep all other things so…

    Do you know if a request in the database can help?

    Thread Starter rwebn

    (@rwebn)

    Hi, they’re created with ACF but I tried without any plugin. And with a default theme… but I still not see the categories and tags.

    And I use 6.2.2 version.

Viewing 4 replies - 1 through 4 (of 4 total)