• 22-08-2020, 13:45:47
    #1
    Satın aldığın tema ile custom post type eklenmiş services adında, permalinkler xxx.com/services/ornek şeklinde oluşuyor, aradaki bu services kısmını değiştirmek yada silmek istiyorum
    Tema kodlarını kurcaladım ama başaramadım.

    services-1.php dosyam
    <?php
    
    // Disable direct call
    if ( ! defined( 'ABSPATH' ) ) { exit; }
    
    
    /* Theme setup section
    -------------------------------------------------------------------- */
    
    if ( !function_exists( 'temaadi_template_services_1_theme_setup' ) ) {
        add_action( 'temaadi_action_before_init_theme', 'temaadi_template_services_1_theme_setup', 1 );
        function temaadi_template_services_1_theme_setup() {
            temaadi_add_template(array(
                'layout' => 'services-1',
                'template' => 'services-1',
                'mode' => 'services',
                'title' => esc_html__('Services /Style 1/', 'temaadi'),
    'thumb_title' => esc_html__('Medium square image (crop)', 'temaadi'),
    'w'         => 370,
    'h'         => 370
            ));
        }
    }
    
    // Template output
    if ( !function_exists( 'temaadi_template_services_1_output' ) ) {
        function temaadi_template_services_1_output($post_options, $post_data) {
            $show_title = !empty($post_data['post_title']);
            $parts = explode('_', $post_options['layout']);
            $style = $parts[0];
            $columns = max(1, min(12, empty($parts[1]) ? (!empty($post_options['columns_count']) ? $post_options['columns_count'] : 1) : (int) $parts[1]));
            if (temaadi_param_is_on($post_options['slider'])) {
                ?><div class="swiper-slide" data-style="<?php echo esc_attr($post_options['tag_css_wh']); ?>" style="<?php echo esc_attr($post_options['tag_css_wh']); ?>"><div class="sc_services_item_wrap"><?php
            } else if ($columns > 1) {
                ?><div class="column-1_<?php echo esc_attr($columns); ?> column_padding_bottom"><?php
            }
            ?>
                <div<?php echo !empty($post_options['tag_id']) ? ' id="'.esc_attr($post_options['tag_id']).'"' : ''; ?>
                    class="sc_services_item sc_services_item_<?php echo esc_attr($post_options['number']) . ($post_options['number'] % 2 == 1 ? ' odd' : ' even') . ($post_options['number'] == 1 ? ' first' : '') . (!empty($post_options['tag_class']) ? ' '.esc_attr($post_options['tag_class']) : ''); ?>"
                    <?php echo (!empty($post_options['tag_css']) ? ' style="'.esc_attr($post_options['tag_css']).'"' : '')
                        . (!temaadi_param_is_off($post_options['tag_animation']) ? ' data-animation="'.esc_attr(temaadi_get_animation_classes($post_options['tag_animation'])).'"' : ''); ?>>
                    <?php
                    if ($post_data['post_icon'] && $post_options['tag_type']=='icons') {
                        $html = temaadi_do_shortcode('[trx_icon icon="'.esc_attr($post_data['post_icon']).'" shape="round"]');
                        if ((!isset($post_options['links']) || $post_options['links']) && !empty($post_data['post_link'])) {
                            ?><a href="<?php echo esc_url($post_data['post_link']); ?>"><?php temaadi_show_layout($html); ?></a><?php
                        } else
                            temaadi_show_layout($html);
                    } else {
                        ?>
                        <div class="sc_services_item_featured post_featured">
                            <?php
                            temaadi_template_set_args('post-featured', array(
                                'post_options' => $post_options,
                                'post_data' => $post_data
                            ));
                            get_template_part(temaadi_get_file_slug('templates/_parts/post-featured.php'));
                            ?>
                        </div>
                        <?php
                    }
                    ?>
                    <div class="sc_services_item_content">
                        <?php
                        if ($show_title) {
                            if ((!isset($post_options['links']) || $post_options['links']) && !empty($post_data['post_link'])) {
                                ?><h3 class="sc_services_item_title"><a href="<?php echo esc_url($post_data['post_link']); ?>"><?php temaadi_show_layout($post_data['post_title']); ?></a></h3><?php
                            } else {
                                ?><h3 class="sc_services_item_title"><?php temaadi_show_layout($post_data['post_title']); ?></h3><?php
                            }
                        }
                        ?>
    
                        <div class="sc_services_item_description">
                            <?php
                            if ($post_data['post_protected']) {
                                temaadi_show_layout($post_data['post_excerpt']);
                            } else {
                                if ($post_data['post_excerpt']) {
                                    echo in_array($post_data['post_format'], array('quote', 'link', 'chat', 'aside', 'status')) ? $post_data['post_excerpt'] : '<p>'.trim(temaadi_strshort($post_data['post_excerpt'], isset($post_options['descr']) ? $post_options['descr'] : temaadi_get_custom_option('post_excerpt_maxlength_masonry'))).'</p>';
                                }
                            }
                            ?>
                        </div>
                    </div>
                </div>
            <?php
            if (temaadi_param_is_on($post_options['slider'])) {
                ?></div></div><?php
            } else if ($columns > 1) {
                ?></div><?php
            }
        }
    }
    ?>
  • 22-08-2020, 13:51:29
    #2
    Normalde custom post type kodlarından değiştirilebiliyor ancak siz bu eklentiyi kullanın isterseniz.

    Bkz. https://tr.wordpress.org/plugins/cus...pe-permalinks/
  • 22-08-2020, 22:19:31
    #3
    wanderlust adlı üyeden alıntı: mesajı görüntüle
    Normalde custom post type kodlarından değiştirilebiliyor ancak siz bu eklentiyi kullanın isterseniz.

    Bkz. https://tr.wordpress.org/plugins/cus...pe-permalinks/
    Kodlardan değiştirmem gerek eklentiyi denedim olmuyor hocam, services yazısına müdahale edemiyorum
  • 23-08-2020, 00:58:39
    #4
    https://wordpress.org/plugins/simple...pe-permalinks/

    Linkteki eklenti ile çözüme ulaştım
  • 23-08-2020, 01:47:05
    #5
    Kodlarınızda custom post type ile alakalı bir yer yok. Farklı bir yerden eklenmiş. register_post_type diye bir fonksiyon olması lazım.