Forum Replies Created

Viewing 11 replies - 1 through 11 (of 11 total)
  • Perotin

    (@perotin)

    Hello, I have downloaded the latest version (4.6.1) and I can translate everything to German (by choosing WordPress language) except the “Choose File”(chrome) or “Browse” (mozilla) and “no file chosen”(chrome) or “no file selected” (mozilla) phrases. How do I do that? Thank you!

    • This reply was modified 8 years ago by Perotin.
    • This reply was modified 8 years ago by Perotin.
    Thread Starter Perotin

    (@perotin)

    thanks, I will check it out:)

    Thread Starter Perotin

    (@perotin)

    and i forgot to add this thing in front of the code: global $post;.

    Thanks;)

    Thread Starter Perotin

    (@perotin)

    Thank you for your help! I found these solutions with wp_get_post_terms:

    Category1, Category2, Category3 display:

    <?php
    $terms = wp_get_post_terms( $post->ID, 'materials');
    
        $count = count( $terms );
        $i = 0;
        $term_list = '<p class="my_term-archive">';
        foreach ( $terms as $term ) {
            $i++;
        	$term_list .= '<a href="' . get_term_link( $term ) . '" title="' . sprintf( __( 'View all post filed under %s', 'my_localization_domain' ), $term->name ) . '">' . $term->name . '</a>';
        	if ( $count != $i ) {
                $term_list .= ', ';
            }
            else {
                $term_list .= '</p>';
            }
        }
        echo $term_list;
    ?>

    and for Parent / Child1 / Child2 display:

    <?php
    $terms = wp_get_post_terms( $post->ID, 'types', array( 'orderby' => 'term_id' ) );
    
        $count = count( $terms );
        $i = 0;
        $term_list = '<p class="my_term-archive">';
        foreach ( $terms as $term ) {
            $i++;
        	$term_list .= '<a href="' . get_term_link( $term ) . '" title="' . sprintf( __( 'View all post filed under %s', 'my_localization_domain' ), $term->name ) . '">' . $term->name . '</a>';
        	if ( $count != $i ) {
                $term_list .= ' / ';
            }
            else {
                $term_list .= '</p>';
            }
        }
        echo $term_list;
    
    ?>

    It was important to me that the terms are “clickable” and point to the archives page.

    Thread Starter Perotin

    (@perotin)

    wow, thanks. it works. I used this code to register the custom taxonomy

    add_action( 'init', 'create_material_taxonomy' );
    
    function create_material_taxonomy() {
    	$labels = array(
    		'name'                           => 'Materials',
    		'singular_name'                  => 'Material',
    		'search_items'                   => 'Search Materials',
    		'all_items'                      => 'All Materials',
    		'edit_item'                      => 'Edit Material',
    		'update_item'                    => 'Update Material',
    		'add_new_item'                   => 'Add New Material',
    		'new_item_name'                  => 'New Material Name',
    		'menu_name'                      => 'Material',
    		'view_item'                      => 'View Material',
    		'popular_items'                  => 'Popular Materials',
    		'separate_items_with_commas'     => 'Separate materials with commas',
    		'add_or_remove_items'            => 'Add or remove materials',
    		'choose_from_most_used'          => 'Choose from the most used materials',
    		'not_found'                      => 'No materials found'
    	);
    
    	register_taxonomy(
    		'materials',
    		'post',
    		array(
    			'label' => __( 'Material' ),
    			'hierarchical' => true,
    			'labels' => $labels,
    			'public' => true,
    			'show_in_nav_menus' => true,
    			'show_tagcloud' => false,
    			'show_admin_column' => true,
    			'rewrite' => array(
    				'slug' => 'materials'
    			)
    		)
    	);
    }

    I have also installed this plugin to filter multiple taxonomies: https://www.ads-software.com/plugins/search-filter

    thank you very much! ??

    Thread Starter Perotin

    (@perotin)

    Thanks. Can I have both categories and custom taxonomies in a post? I use the default post type.

    Perotin

    (@perotin)

    sorry, the code was so similar to my theme… but i think you could solve the problem by comparing the code I gave you with your template.

    Perotin

    (@perotin)

    sorry, i’m doing it on my localhost server.
    hm..I dont’have that file in my folder. is that the “artiste” theme?

    Perotin

    (@perotin)

    i changed the template-home.php (it lists your portfolio work)

    Perotin

    (@perotin)

    Ok, I think I’ve solved it. Replace the code with this one:

    https://pastebin.com/0TMNr042

    and don’t forget to install the wp-pagenavi plugin.

    Perotin

    (@perotin)

    the same template here and the same problem. you could change “‘posts_per_page’ => -1” to a number you want but don’t know how to add the pagination.
    Anybody?

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