Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter marikades

    (@marikades)

    <?php add_post_type_support( ‘al_product’, ‘revisions’ ) ?>

    Where? Where I will insert this code?
    Thank’s

    [su_button style="3d" url="link to document" target="blank" background="#2189af" size="8" text_shadow="20px 0px 10px #000000" desc="" title="Download" id="3"]Download text[/su_button]

    The document link, you can see in wordpress media manager;
    “title” is text displayed when mouse is over the button;
    The “Download text” is text button

    • This reply was modified 5 years, 9 months ago by marikades.
    Thread Starter marikades

    (@marikades)

    hi, here is my testing Web Site
    https://blog.marikadesantis.it/opere/
    I am an artist and I realize all my works: paintings, drawings, books and bricolage (decoupage, etc.).

    1) it is necessary for me to maintain a certain disposition of the website, something that I do well with the pages, because for the pages it is possible to set the parent page and from there, the others.
    Example:
    jobs, main page (categories page);
    ???????? -> Publications (sub-category 1: books)
    Each sub-category has its own works, example:
    Publications …
    ?????? -> Book 1
    ?????? -> Book 2
    When I set the data, the permalinks don’t match, but go down a level, example:
    blog-name -> jobs
    blog-name -> jobs -> publications -> book 1 (correct)
    instead it appears
    blog-name -> jobs -> book 1 (wrong)
    is it possible to correct the permalink?

    2) normally wordpress does not allow tags, categories and taxonomies on all objects, and I have activated it on the whole web site with this script:

    
    //*Abilito il supporto di categorie e tag su tutto il Sito
    
    function all_with_category_and_tag_register(){
      /*add categories and tags to pages*/
      register_taxonomy_for_object_type('category', 'page');
      register_taxonomy_for_object_type('post_tag', 'page');
      register_taxonomy_for_object_type('category', 'attachment');
      register_taxonomy_for_object_type('post_tag', 'attachment');
      
    }
    add_action( 'init', 'all_with_category_and_tag_register');
    
    function all_with_category_and_tag_register_pre_get( $query ) {
    
      if ( is_admin() || ! $query->is_main_query() ) {
        return;
      }
      /*view categories and tags archive pages */
      if($query->is_category && $query->is_main_query()){
        $query->set('post_type', array( 'post', 'page', 'attachment'));
      }
      if($query->is_tag && $query->is_main_query()){
        $query->set('post_type', array( 'post', 'page', 'attachment'));
      }
    }
    add_action( 'pre_get_posts', 'all_with_category_and_tag_register_pre_get' );
    
    //*Abilito e creo Tassonomia Personalizzata per Tutto il sito
    function wptp_add_location_taxonomy() {
        $labels = array(
            'name'              => 'Tassonomie',
            'singular_name'     => 'Tassonomia',
            'search_items'      => 'Cerca Tassonomie',
            'all_items'         => 'Vedi Tutte',
            'parent_item'       => 'Tassonomia Genitore',
            'parent_item_colon' => 'Tassonomia Genitore:',
            'edit_item'         => 'Modifica Tassonomia',
            'update_item'       => 'Aggiorna Tassonomia',
            'add_new_item'      => 'Aggiungi Nuova Tassonomia',
            'new_item_name'     => 'Nuovo Nome Tassonomia',
            'menu_name'         => 'Tassonomia',
        );
     
        $args = array(
            'labels' => $labels,
            'hierarchical' => true,
            'query_var' => 'true',
            'rewrite' => 'true',
            'show_admin_column' => 'true',
        );
    //*Dopo l'array inserisco tutti gli slug dei posti dove voglio appaiano le tassonomie 
        register_taxonomy( 'location', array( 'attachment', 'post', 'page', ), $args );
    }
    add_action( 'init', 'wptp_add_location_taxonomy' );
    

    When I use the script with CPT (custom post type), example “Custom Post Type UI plugin”, all pages, posts and attachments work’s fine.
    I tried to modify it for compatibility, but apparently, the plugin (product catalog X) does not support it. Result?
    Unified categories, tags and taxonomies for the whole site, but the plugin does not see them and uses its categories. And my tags and taxonomies disappear in the plugin.

    Thank’s for your help :-*

    • This reply was modified 5 years, 9 months ago by marikades.
    • This reply was modified 5 years, 9 months ago by marikades.
    • This reply was modified 5 years, 9 months ago by marikades.

    Amazing idea
    Thank you :-*

    Thread Starter marikades

    (@marikades)

    Hi, was a server problem
    Solved

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