Git Product home page Git Product logo

Comments (6)

johngodley avatar johngodley commented on August 18, 2024

Rejected how?

Do you have any server error logs? Do you have any plugins that add custom post types?

from search-regex.

Li-An avatar Li-An commented on August 18, 2024

Yes, I created a little plugin to manage one custom post type.

And rejected saying that the email address does not exist.

from search-regex.

johngodley avatar johngodley commented on August 18, 2024

Would it be possible to see the custom post type plugin? I suspect something in that might be triggering an error, and it will help to reproduce it.

https://searchregex.com/contact/

from search-regex.

Li-An avatar Li-An commented on August 18, 2024

Here is the code

<?php
/**
 * Plugin Name: ECHO Maison Codes Snippet Plugin
 * Plugin URI: http://www.li-an.fr/blog/
 * Description: Gestion des bouts de code utiles
 * Version: 1.0
 * Author: Li-An
 * Author URI: http://www.li-an.fr/blog/
 */ 
 
add_action('init', 'my_custom_init');
function my_custom_init()
{
/* notre code PHP pour rajouter les custom post type */
register_post_type(
  'code',
  array(
    'label' => 'Codes',
    'labels' => array(
      'name' => 'Codes',
      'singular_name' => 'Code',
      'all_items' => 'Tous les codes',
      'add_new_item' => 'Ajouter un code',
      'edit_item' => 'Éditer un code',
      'new_item' => 'Nouveau code',
      'view_item' => 'Voir code',
      'search_items' => 'Rechercher parmi les codes',
      'not_found' => 'Pas un code trouvé',  
      'rewrite' => array("slug" => "codes"),
      'query_var' => "codes", // This goes to the WP_Query schema
      'not_found_in_trash'=> 'Pas un code dans la corbeille'
      ),
    'public' => true,
    'capability_type' => 'post',
    'supports' => array(
      'title',
      'editor',
      'thumbnail' ,
      'excerpt',
      'wpcom-markdown',
      
    ),
    'has_archive' => true
  )
);  
register_taxonomy(
  'utilisation',
  'code',
  array(
    'label' => 'Utilisation',
    'labels' => array(
    'name' => 'Utilisations',
    'singular_name' => 'Utilisation',
    'all_items' => 'Toustes les utilisations',
    'edit_item' => 'Éditer l’utilisation',
    'view_item' => 'Voir l’utilisation',
    'update_item' => 'Mettre à jour l’utilisation',
    'add_new_item' => 'Ajouter une utilisation',
    'new_item_name' => 'Nouvelle utilisation',
    'search_items' => 'Rechercher parmi les utilisations',
    'popular_items' => 'utilisations les plus utilisés'
  ),
  'hierarchical' => false
  )
);
register_taxonomy_for_object_type( 'utilisation', 'code' );
}

function my_cptui_change_posts_per_page( $query ) {
    if ( is_admin() || ! $query->is_main_query() ) {
       return;
    }

    if ( is_post_type_archive( 'code' ) ) {
       $query->set( 'posts_per_page', 30 );
    }
}
add_filter( 'pre_get_posts', 'my_cptui_change_posts_per_page' );

I forget to tell I use https://fr.wordpress.org/plugins/wp-downloadmanager/ (so custom post types here too).

from search-regex.

johngodley avatar johngodley commented on August 18, 2024

Thanks! I'll try it out

from search-regex.

Li-An avatar Li-An commented on August 18, 2024

Sorry, I did not try the basic test : desactivating other plugins. It works "correctly" in this case. So I have to check witch extension is interfering. But I have another problem. I open a new ticket.

from search-regex.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.