0 / 0 / 0
Регистрация: 29.12.2012
Сообщений: 10
1

Не отображаются ссылки в постах через категории

18.01.2013, 12:45. Показов 3483. Ответов 5
Метки нет (Все метки)

Author24 — интернет-сервис помощи студентам
Добрый день!
У меня следующая проблема: в категориях не отображаются ссылки постов. Т.е. если заходишь в саму запись-ссылки прекрасно работают, а если просматривать те же записи через категории к которым они принадлежат - ссылок не видно, они идут обычным текстом.
Пример для наглядности:
Не отображаются ссылки в постах через категории


Как видно из скрина, у человека ссылки постов отображаются внутри категорий. А у меня нет
В чем может быть проблема?

Выкладываю код index.php моей темы, может в нем какой косяк?

PHP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php get_header(); ?>
                            
    <?php get_template_part('includes/top_info'); ?>
    
    <div id="content-top"></div>
    <div id="content" class="clearfix">
        <div id="content-area">
            <?php get_template_part('includes/breadcrumbs'); ?>
            
            <?php $i = 1;?>
            
            <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
                <div class="post clearfix">
                    <h2 class="post-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
                    <?php get_template_part('includes/postinfo'); ?>
                    
                    <?php 
                        $thumb = '';
                        $width = 211;
                        $height = 211;
                        $classtext = '';
                        $titletext = get_the_title();
                        
                        $thumbnail = get_thumbnail($width,$height,$classtext,$titletext,$titletext,false,'Entry');
                        $thumb = $thumbnail["thumb"]; 
                    ?>
                    
                    <?php if($thumb <> '' && get_option('instyle_thumbnails_index') == 'on') { ?>
                        <div class="post-thumbnail alignleft">
                            <a href="<?php the_permalink(); ?>">
                                <?php print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext, $width, $height, $classtext); ?>
                                <span class="post-overlay"></span>
                            </a>    
                        </div>  <!-- end .post-thumbnail -->
                    <?php } ?>
                    
                    <div class="description">
                        <?php if ( get_option('instyle_blog_style') == 'on' ){ ?>
                            <?php echo apply_filters('the_content',et_create_dropcaps(get_the_content(''))); ?>
                        <?php } else { ?>
                            <p><?php echo et_create_dropcaps(truncate_post(775,false)); ?></p>
                        <?php } ?>
                    </div>  <!-- end .description-->
                    <?php if (in_category('5')) : ?>
                    <?php else : ?>
                    <a href="<?php the_permalink(); ?>" class="readmore"><span><?php esc_html_e('read more','InStyle'); ?></span></a>
                    <?php endif; ?>
                </div> <!-- end .post -->
            <?php endwhile; ?>
                <?php 
                    if(function_exists('wp_pagenavi')) { wp_pagenavi(); }
                    else { get_template_part('includes/navigation'); } 
                ?>
            <?php else : ?>
                <?php get_template_part('includes/no-results'); ?>                  
            <?php endif; ?>
        </div> <!-- end #content-area -->
        
        <?php get_sidebar(); ?>
    </div> <!--end #content-->
    <div id="content-bottom"></div>
    
<?php get_footer(); ?>
Заранее благодарю за помощь
0
Programming
Эксперт
94731 / 64177 / 26122
Регистрация: 12.04.2006
Сообщений: 116,782
18.01.2013, 12:45
Ответы с готовыми решениями:

Скрыть миниатюры в постах конкретной категории
Всем привет. Каким образом скрыть миниатюры в постах конкретной категории? То есть, миниатюры не...

Не отображаются категории в админ панеле
Возникла такая проблема. Когда выбираю отобразить рубрики в админ панели, то не показываются...

Вирус пишущий ссылки в постах
Где-то подцепил вирус который пишет код ссылки в любых сообщениях написанных мной в интернете на...

Вирус сам вставляет ссылки в постах на форумах
Добрый день. Уже с неделю такая проблема: вирь вставляет ссылки во все возможные поля ввода. К...

5
странник
810 / 481 / 108
Регистрация: 28.05.2012
Сообщений: 1,518
Записей в блоге: 2
20.01.2013, 13:19 2
Этого не достаточно. Надо смотреть содержимое функций apply_filters и et_create_dropcaps (скорее всего эта функция и удаляет тэги при выводе)

Жесть:
PHP
1
2
3
4
                    <?php if (in_category('5')) : ?>
                    <?php else : ?>
                    <a href="<?php the_permalink(); ?>" class="readmore"><span><?php esc_html_e('read more','InStyle'); ?></span></a>
                    <?php endif; ?>
Сделай так:
PHP
1
2
3
                    <?php if (!in_category('5')) : ?>
                    <a href="<?php the_permalink(); ?>" class="readmore"><span><?php esc_html_e('read more','InStyle'); ?></span></a>
                    <?php endif; ?>
1
0 / 0 / 0
Регистрация: 29.12.2012
Сообщений: 10
20.01.2013, 19:30  [ТС] 3
Donald28, вот functions.php:

PHP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
<?php 
add_action( 'after_setup_theme', 'et_setup_theme' );
if ( ! function_exists( 'et_setup_theme' ) ){
    function et_setup_theme(){
        global $themename, $shortname;
        $themename = "InStyle";
        $shortname = "instyle";
    
        require_once(TEMPLATEPATH . '/epanel/custom_functions.php'); 
 
        require_once(TEMPLATEPATH . '/includes/functions/comments.php'); 
 
        require_once(TEMPLATEPATH . '/includes/functions/sidebars.php'); 
 
        load_theme_textdomain('InStyle',get_template_directory().'/lang');
 
        require_once(TEMPLATEPATH . '/epanel/options_instyle.php');
 
        require_once(TEMPLATEPATH . '/epanel/core_functions.php'); 
 
        require_once(TEMPLATEPATH . '/epanel/post_thumbnails_instyle.php');
        
        include(TEMPLATEPATH . '/includes/widgets.php');
        
        require_once(TEMPLATEPATH . '/includes/additional_functions.php');
    }
}
 
add_action('wp_head','et_portfoliopt_additional_styles',100);
function et_portfoliopt_additional_styles(){ ?>
    <style type="text/css">
        #et_pt_portfolio_gallery { margin-left: -11px; }
        .et_pt_portfolio_item { margin-left: 23px; }
        .et_portfolio_small { margin-left: -39px !important; }
        .et_portfolio_small .et_pt_portfolio_item { margin-left: 31px !important; }
        .et_portfolio_large { margin-left: -20px !important; }
        .et_portfolio_large .et_pt_portfolio_item { margin-left: 6px !important; }
    </style>
<?php }
 
function register_main_menus() {
    register_nav_menus(
        array(
            'primary-menu' => __( 'Primary Menu' )
        )
    );
}
if (function_exists('register_nav_menus')) add_action( 'init', 'register_main_menus' );
 
if ( ! function_exists( 'et_create_dropcaps' ) ){
    function et_create_dropcaps($post_text){
       global $shortname;
       
       if ( get_option($shortname . '_dropcaps') == 'false' ) return $post_text;
       
       $post_content_text = trim($post_text);
       $post_content_temp = trim(strip_tags($post_text));
       $coded_tag = strpos($post_content_text, 'class="drop-caps"');
        if ( $coded_tag !== false ) return $post_text;
          
       # don't create drop-cap if shortcodes is on top of the post content
       if ( $post_content_temp[0] == '[' || $post_content_temp == '' ) return $post_text;
       else {
          //get first 7 letters
          $first_word = mb_substr($post_content_temp, 0, 7, 'UTF-8');
       }
       
       $first_word_pos = strpos($post_content_text, $first_word);
       if ( $first_word_pos === false ) return $post_text;
          
       $post_content_firstletter = mb_substr($post_content_text, $first_word_pos, 1, 'UTF-8');
       if ( $first_word_pos == 0 )
          $post_content_text_temp = '';
       else
          $post_content_text_temp = mb_substr($post_content_text, 0, $first_word_pos-1, 'UTF-8');
       $post_content_text_temp2 = mb_substr($post_content_text, $first_word_pos+1, strlen($post_content_text), 'UTF-8');
          
       return '<span class="drop-caps">' . $post_content_firstletter . '</span>' . $post_content_text_temp . $post_content_text_temp2;
    }
}
 
add_action('wp_head','et_add_meta_javascript');
function et_add_meta_javascript(){
    global $shortname;
    echo '<!-- used in scripts -->';
    echo '<meta name="et_bg_image_speed" content="'.get_option($shortname.'_bg_image_speed').'" />';
    echo '<meta name="et_service_image_speed" content="'.get_option($shortname.'_service_image_speed').'" />';
    
    $disable_toptier = get_option($shortname.'_disable_toptier') == 'on' ? 1 : 0;
    echo '<meta name="et_disable_toptier" content="'.$disable_toptier.'" />';
    
    $cufon = get_option($shortname.'_cufon') == 'on' ? 1 : 0;
    echo '<meta name="et_cufon" content="'.$cufon.'" />';
}
 
add_filter('body_class','et_cufon_class');
function et_cufon_class($classes) {
    global $shortname;
 
    if ( get_option($shortname.'_cufon') == 'false' ) $classes[] = 'cufon-disabled';
    
    return $classes;
}
 
add_filter( 'avatar_defaults', 'defgravatar' );
function defgravatar ($avatar_defaults) {
$myavatar = get_bloginfo('template_directory') . '/images/unknown.png';
$avatar_defaults[$myavatar] = "unknown";
return $avatar_defaults;
}
 
if ( ! function_exists( 'et_list_pings' ) ){
    function et_list_pings($comment, $args, $depth) {
        $GLOBALS['comment'] = $comment; ?>
        <li id="comment-<?php comment_ID(); ?>"><?php comment_author_link(); ?> - <?php comment_excerpt(); ?>
    <?php }
}
 
if ( ! function_exists( 'et_comment_form' ) ){
    function et_comment_form( $args = array(), $post_id = null ) {
        # copy of comment_form() function, we just add 2 more action hooks to style it properly
        
        global $user_identity, $id;
 
        if ( null === $post_id )
            $post_id = $id;
        else
            $id = $post_id;
 
        $commenter = wp_get_current_commenter();
 
        $req = get_option( 'require_name_email' );
        $aria_req = ( $req ? " aria-required='true'" : '' );
        $fields =  array(
            'author' => '<p class="comment-form-author">' . '<label for="author">' . __( 'Name' ) . '</label> ' . ( $req ? '<span class="required">*</span>' : '' ) .
                        '<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' /></p>',
            'email'  => '<p class="comment-form-email"><label for="email">' . __( 'Email' ) . '</label> ' . ( $req ? '<span class="required">*</span>' : '' ) .
                        '<input id="email" name="email" type="text" value="' . esc_attr(  $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' /></p>',
        );
 
        $required_text = sprintf( ' ' . __('Required fields are marked %s'), '<span class="required">*</span>' );
        $defaults = array(
            'fields'               => apply_filters( 'comment_form_default_fields', $fields ),
            'comment_field'        => '<p class="comment-form-comment"><label for="comment">' . _x( 'Comment', 'noun' ) . '</label><textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea></p>',
            'must_log_in'          => '<p class="must-log-in">' .  sprintf( __( 'You must be <a href="%s">logged in</a> to post a comment.' ), wp_login_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '</p>',
            'logged_in_as'         => '<p class="logged-in-as">' . sprintf( __( 'Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s" title="Log out of this account">Log out?</a>' ), admin_url( 'profile.php' ), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '</p>',
            'id_form'              => 'commentform',
            'id_submit'            => 'submit',
            'title_reply'          => __( 'Leave a Reply' ),
            'title_reply_to'       => __( 'Leave a Reply to %s' ),
            'cancel_reply_link'    => __( 'Cancel reply' ),
            'label_submit'         => __( 'Post Comment' ),
        );
 
        $args = wp_parse_args( $args, apply_filters( 'comment_form_defaults', $defaults ) );
 
        ?>
            <?php if ( comments_open() ) : ?>
                <?php do_action( 'comment_form_before' ); ?>
                <div id="respond">
                    <?php do_action( 'et_comment_respond_top' ); ?>
                    <h3 id="reply-title"><?php comment_form_title( $args['title_reply'], $args['title_reply_to'] ); ?> <small><?php cancel_comment_reply_link( $args['cancel_reply_link'] ); ?></small></h3>
                    <?php if ( get_option( 'comment_registration' ) && !is_user_logged_in() ) : ?>
                        <?php echo $args['must_log_in']; ?>
                        <?php do_action( 'comment_form_must_log_in_after' ); ?>
                    <?php else : ?>
                        <form action="<?php echo site_url( '/wp-comments-post.php' ); ?>" method="post" id="<?php echo esc_attr( $args['id_form'] ); ?>">
                            <?php do_action( 'comment_form_top' ); ?>
                            <?php if ( is_user_logged_in() ) : ?>
                                <?php echo apply_filters( 'comment_form_logged_in', $args['logged_in_as'], $commenter, $user_identity ); ?>
                                <?php do_action( 'comment_form_logged_in_after', $commenter, $user_identity ); ?>
                            <?php else : ?>
                                <?php echo $args['comment_notes_before']; ?>
                                <?php
                                do_action( 'comment_form_before_fields' );
                                foreach ( (array) $args['fields'] as $name => $field ) {
                                    echo apply_filters( "comment_form_field_{$name}", $field ) . "\n";
                                }
                                do_action( 'comment_form_after_fields' );
                                ?>
                            <?php endif; ?>
                            <?php echo apply_filters( 'comment_form_field_comment', $args['comment_field'] ); ?>
                            <?php echo $args['comment_notes_after']; ?>
                            <p class="form-submit">
                                <input name="submit" type="submit" id="<?php echo esc_attr( $args['id_submit'] ); ?>" value="<?php echo esc_attr( $args['label_submit'] ); ?>" />
                                <?php comment_id_fields( $post_id ); ?>
                            </p>
                            <?php do_action( 'comment_form', $post_id ); ?>
                        </form>
                    <?php endif; ?>
                    <?php do_action( 'et_comment_respond_bottom' ); ?>
                </div><!-- #respond -->
                <?php do_action( 'comment_form_after' ); ?>
            <?php else : ?>
                <?php do_action( 'comment_form_comments_closed' ); ?>
            <?php endif; ?>
        <?php
    }
}
 
add_action( 'et_comment_respond_top', 'instyle_comment_respond_top' );
function instyle_comment_respond_top(){
    echo '<div class="comment-wrap"> <div class="comment-wrap-inner clearfix">';
}
 
add_action( 'et_comment_respond_bottom', 'instyle_comment_respond_bottom' );
function instyle_comment_respond_bottom(){
    echo '</div> <!-- end. comment-wrap-inner -->
    </div> <!-- end .comment-wrap-inner -->';
} ?>
0
0 / 0 / 0
Регистрация: 29.12.2012
Сообщений: 10
23.01.2013, 13:38  [ТС] 4
Неужели никто не знает как это исправить?
0
0 / 0 / 0
Регистрация: 08.12.2012
Сообщений: 2
06.11.2013, 10:21 5
Та же проблема, не смог решить. Тема Atahualpa, на странице категории в предпросмотрах поста отображаются ссылки простым текстом; нельзя закрепить документы.
http://storage6.static.itmages... ea85ec.png

Добавлено через 1 час 10 минут
Вот functions.php
PHP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
<?php
 
$bfa_ata_version = "3.7.12";
 
 
 
// Load translation file above
 
load_theme_textdomain('atahualpa');
 
 
 
// To disable some default WP filters, remove the '#' character
 
#remove_filter('the_content', 'wptexturize');
 
#remove_filter('the_excerpt', 'wptexturize');
 
#remove_filter('comment_text', 'wptexturize');
 
#remove_filter('the_title', 'wptexturize');
 
 
 
// get default theme options
 
include_once (get_template_directory() . '/functions/bfa_theme_options.php');
 
// Load options
 
include_once (get_template_directory() . '/functions/bfa_get_options.php');
 
list($bfa_ata, $cols, $left_col, $left_col2, $right_col, $right_col2, $bfa_ata['h_blogtitle'], $bfa_ata['h_posttitle']) = bfa_get_options();
 
// Sidebars:
 
if ( function_exists('register_sidebar') ) {
 
    register_sidebar(array(
 
        'name'=>'Left Sidebar',
 
        'before_widget' => '<div id="%1$s" class="widget %2$s">',
 
        'after_widget' => '</div>',
 
        'before_title' => '<div class="widget-title"><h3>',
 
        'after_title' => '</h3></div>',
 
    ));
 
    register_sidebar(array(
 
        'name'=>'Right Sidebar',
 
        'before_widget' => '<div id="%1$s" class="widget %2$s">',
 
        'after_widget' => '</div>',
 
        'before_title' => '<div class="widget-title"><h3>',
 
        'after_title' => '</h3></div>',
 
    ));
 
    register_sidebar(array(
 
        'name'=>'Left Inner Sidebar',
 
        'before_widget' => '<div id="%1$s" class="widget %2$s">',
 
        'after_widget' => '</div>',
 
        'before_title' => '<div class="widget-title"><h3>',
 
        'after_title' => '</h3></div>',
 
    ));
 
    register_sidebar(array(
 
        'name'=>'Right Inner Sidebar',
 
        'before_widget' => '<div id="%1$s" class="widget %2$s">',
 
        'after_widget' => '</div>',
 
        'before_title' => '<div class="widget-title"><h3>',
 
        'after_title' => '</h3></div>',
 
    ));
 
            
 
    // Register additional extra widget areas:
 
    # $bfa_ata_extra_widget_areas = get_option('bfa_widget_areas');
 
    if(isset($bfa_ata['bfa_widget_areas'])) $bfa_ata_extra_widget_areas = $bfa_ata['bfa_widget_areas'];
 
    else $bfa_ata_extra_widget_areas = '';
 
    
 
    if ($bfa_ata_extra_widget_areas != '') {
 
        foreach ($bfa_ata_extra_widget_areas as $widget_area) { 
 
            register_sidebar(array(
 
                'name' => $widget_area['name'],
 
                'before_widget' => $widget_area['before_widget'],
 
                'after_widget' => $widget_area['after_widget'],
 
                'before_title' => $widget_area['before_title'],
 
                'after_title' => $widget_area['after_title']
 
            ));
 
        }
 
    }
 
} 
 
 
 
#global $bfa_ata;
 
// Load functions
 
include_once (get_template_directory() . '/functions/bfa_header_config.php');
 
include_once (get_template_directory() . '/functions/bfa_meta_tags.php');
 
include_once (get_template_directory() . '/functions/bfa_hor_cats.php');
 
include_once (get_template_directory() . '/functions/bfa_hor_pages.php');
 
// New WP3 menus:
 
include_once (get_template_directory() . '/functions/bfa_new_wp3_menus.php');
 
include_once (get_template_directory() . '/functions/bfa_footer.php');
 
include_once (get_template_directory() . '/functions/bfa_recent_comments.php');
 
include_once (get_template_directory() . '/functions/bfa_popular_posts.php');
 
include_once (get_template_directory() . '/functions/bfa_popular_in_cat.php');
 
include_once (get_template_directory() . '/functions/bfa_subscribe.php');
 
include_once (get_template_directory() . '/functions/bfa_postinfo.php');
 
include_once (get_template_directory() . '/functions/bfa_rotating_header_images.php');
 
include_once (get_template_directory() . '/functions/bfa_next_previous_links.php');
 
include_once (get_template_directory() . '/functions/bfa_post_parts.php');
 
if (!function_exists('paged_comments'))  
 
    include_once (get_template_directory() . '/functions/bfa_custom_comments.php');
 
    
 
// Since 3.5.2: JSON for PHP 4 & 5.1:
 
if (!function_exists('json_decode')) {
 
    include_once (get_template_directory() . '/functions/JSON.php');
 
    function json_encode($data) { $json = new Services_JSON(); return( $json->encode($data) ); }
 
    function json_decode($data) { $json = new Services_JSON(); return( $json->decode($data) ); }
 
}
 
function bfa_toArray($data) {
 
    if (is_object($data)) $data = get_object_vars($data);
 
    return is_array($data) ? array_map(__FUNCTION__, $data) : $data;
 
}
 
 
 
 
 
 
 
// For plugin "Sociable":
 
if (function_exists('sociable_html')) 
 
    include_once (get_template_directory() . '/functions/bfa_sociable2.php'); 
 
 
 
// "Find in directory" function, needed for finding header images on WPMU
 
if (file_exists(ABSPATH."/wpmu-settings.php")) 
 
    include_once (get_template_directory() . '/functions/bfa_m_find_in_dir.php');
 
 
 
// CSS for admin area
 
include_once (get_template_directory() . '/functions/bfa_css_admin_head.php');
 
// Add the CSS to the <head>...</head> of the theme option admin area
 
add_action('admin_head', 'bfa_add_stuff_admin_head');
 
 
 
include_once (get_template_directory() . '/functions/bfa_ata_add_admin.php');
 
include_once (get_template_directory() . '/functions/bfa_ata_admin.php');
 
add_action('admin_menu', 'bfa_ata_add_admin');
 
 
 
 
 
// Escape single & double quotes
 
function bfa_escape($string) {
 
    $string = str_replace('"', '"', $string);
 
    $string = str_replace("'", ''', $string);
 
    return $string;
 
}
 
 
 
 
 
 
 
/**
 
 * Since 3.7.9
 
 * Redirect users to Theme Options after activation, this will also create the 
 
 * CSS file in the uploads dir, for the first time
 
 */
 
if ( is_admin() && isset($_GET['activated'] ) && $pagenow == "themes.php" )
 
    wp_redirect( 'themes.php?page=atahualpa-options' );
 
    
 
 
 
 
 
 
 
function bfa_footer_output($footer_content) {
 
    global $bfa_ata;
 
    $footer_content .= '<br />Powered by <a href="http://wordpress.org/">WordPress</a> &amp; <a href="http://forum.bytesforall.com/">Atahualpa</a>';
 
    return $footer_content;
 
}
 
 
 
// Move Featured Content Gallery down in script order in wp_head(), so that jQuery can finish before mootools
 
// Since 3.6 this probably won't work because as per the new WP rules wp_head() must be right before </head>
 
function bfa_remove_featured_gallery_scripts() {
 
       remove_action('wp_head', 'gallery_styles');
 
}
 
add_action('init','bfa_remove_featured_gallery_scripts', 1);
 
 
 
function bfa_addscripts_featured_gallery() {
 
    if(!function_exists('gallery_styles')) return;
 
    gallery_styles();
 
}
 
add_action('wp_head', 'bfa_addscripts_featured_gallery', 12);
 
 
 
/*
 
 * Add custom header inserts through wp_head
 
 *
 
 * wp_head is supposed to be right before </head>, but html_inserts_header should be after/at the bottom of wp_head
 
 *
 
@ since 3.6.5
 
*/
 
function bfa_add_html_inserts_header() {
 
    global $bfa_ata;
 
    if( $bfa_ata['html_inserts_header'] != '' ) bfa_incl('html_inserts_header'); 
 
}
 
add_action('wp_head', 'bfa_add_html_inserts_header', 20);
 
 
 
// new comment template for WP 2.7+, legacy template for old WP 2.6 and older
 
// Since 3.6.: ToDo: Remove legacy.comments.php after a while. Older WP's won't work anyway 
 
// with the new WP requirements to REPLACE older functions with newer ones introduced in 2.8 (i.e. get_the_author_meta)
 
if ( !function_exists('paged_comments') ) {
 
    include_once (get_template_directory() . '/functions/bfa_custom_comments.php'); 
 
}
 
 
 
// remove WP default inline CSS for ".recentcomments a" from header
 
function bfa_remove_wp_widget_recent_comments_style() {
 
      remove_filter('wp_head', 'wp_widget_recent_comments_style' );
 
}
 
add_filter( 'wp_head', 'bfa_remove_wp_widget_recent_comments_style', 1 );
 
 
 
 
 
/* Remove plugin CSS & JS and include them in the theme's main CSS and JS files
 
This will be extended and improved in upcoming versions */
 
 
 
// remove WP Pagenavi CSS, will be included in css.php
 
if (function_exists('wp_pagenavi')) {
 
    remove_action('wp_head', 'pagenavi_css');
 
}
 
 
 
// If the plugin Share This is activated, disable its auto-output so we can control it 
 
// through the Atahualpa Theme Options
 
if ( function_exists('akst_share_link') ) {
 
    @define('AKST_ADDTOCONTENT', false);
 
    @define('AKST_ADDTOFOOTER', false);
 
}
 
 
 
/* EXTERNAL OR INTERNAL CSS & JS, PLUS COMPRESSION & DEBUG */
 
 
 
// Register new query variables "bfa_ata_file" and "bfa_debug" with Wordpress
 
add_filter('query_vars', 'bfa_add_new_var_to_wp');
 
function bfa_add_new_var_to_wp($public_query_vars) {
 
    $public_query_vars[] = 'bfa_ata_file';
 
    $public_query_vars[] = 'bfa_debug';
 
    return $public_query_vars;
 
}
 
 
 
// if debug add/remove info
 
if ( function_exists('wp_generator') ) {
 
    remove_action('wp_head', 'wp_generator');
 
}
 
add_action('wp_head', 'bfa_debug');
 
function bfa_debug() {
 
    global $bfa_ata, $bfa_ata_version;
 
    $debug = get_query_var('bfa_debug');
 
    if ( $debug == 1 ) {
 
        echo '<meta name="theme" content="Atahualpa ' . $bfa_ata_version . '" />' . "\n";
 
        if ( function_exists('the_generator') ) { 
 
            the_generator( apply_filters( 'wp_generator_type', 'xhtml' ) );
 
        }
 
        echo '<meta name="robots" content="noindex, follow" />'."\n";
 
    }
 
}   
 
 
 
// redirect the template if new var "bfa_ata_file" or "bfa_debug" exists in URL 
 
add_action('template_redirect', 'bfa_css_js_redirect');
 
add_action('wp_head', 'bfa_inline_css_js');
 
 
 
// since 3.4.3 
 
function bfa_add_js_link() {
 
    global $bfa_ata;
 
    $homeURL = get_home_url();  
 
    
 
    if ( $bfa_ata['javascript_external'] == "External" ) { ?>
 
    <script type="text/javascript" src="<?php echo $homeURL; ?>/?bfa_ata_file=js"></script>
 
    <?php } 
 
}
 
add_action('wp_head', 'bfa_add_js_link');
 
 
 
function bfa_css_js_redirect() {
 
    global $bfa_ata;
 
    $bfa_ata_query_var_file = get_query_var('bfa_ata_file');
 
    if ( $bfa_ata_query_var_file == "css" OR $bfa_ata_query_var_file == "js" ) {
 
        include_once (get_template_directory() . '/' . $bfa_ata_query_var_file . '.php');
 
        exit; // this stops WordPress entirely
 
    }
 
    // Since 3.4.7: Import/Export Settings
 
    if ( $bfa_ata_query_var_file == "settings-download" ) {
 
        if(isset($_FILES['userfile'])) $uploadedfile = $_FILES['userfile'];
 
        include_once (get_template_directory() . '/download.php');
 
        exit; // this stops WordPress entirely
 
    }
 
    if ( $bfa_ata_query_var_file == "settings-upload" ) {
 
        include_once (get_template_directory() . '/upload.php');
 
        exit; // this stops WordPress entirely
 
    }
 
}
 
    
 
function bfa_inline_css_js() {
 
    global $bfa_ata;
 
    $bfa_ata_preview = get_query_var('preview');
 
    $bfa_ata_debug = get_query_var('bfa_debug');
 
    if ( $bfa_ata_preview == 1 OR $bfa_ata['css_external'] == "Inline" OR 
 
    ( $bfa_ata_debug == 1 AND $bfa_ata['allow_debug'] == "Yes" ) ) {
 
        include_once (get_template_directory() . '/css.php');
 
    }
 
    if ( $bfa_ata_preview == 1 OR $bfa_ata['javascript_external'] == "Inline" OR 
 
    ( $bfa_ata_debug == 1 AND $bfa_ata['allow_debug'] == "Yes" ) ) {
 
        include_once (get_template_directory() . '/js.php');
 
    }
 
}
 
 
 
 
 
function bfa_delete_bfa_ata4() {
 
    check_ajax_referer( "delete_bfa_ata4" );
 
    if (delete_option('bfa_ata4')) echo '<span style="color:green;font-weight:bold;">Successfully deleted option \'bfa_ata4\' ...</span>'; 
 
    else echo '<span style="color:green;font-weight:bold;">Something went wrong...</span>';
 
    die();
 
}
 
// add_action ( 'wp_ajax_' + [name of "action" in jQuery.ajax, see functions/bfa_css_admin_head.php], [name of function])
 
add_action( 'wp_ajax_bfa_delete_bfa_ata4', 'bfa_delete_bfa_ata4' );
 
 
 
 
 
 
 
// Custom Excerpts 
 
function bfa_wp_trim_excerpt($text) { // Fakes an excerpt if needed
 
 
 
    global $bfa_ata, $post;
 
 
 
    if ( '' <> $text ) {
 
//  an manual excerpt exists, stick on the 'custom read more' and we're done
 
        $words = preg_split("/\s+/u", $text);
 
        $custom_read_more = str_replace('%permalink%', get_permalink(), $bfa_ata['custom_read_more']);
 
        if ( get_the_title() == '' ) { 
 
            $custom_read_more = str_replace('%title%', 'Permalink', $custom_read_more);
 
        } else {        
 
            $custom_read_more = str_replace('%title%', the_title('','',FALSE), $custom_read_more);
 
        }
 
        array_push($words, $custom_read_more);
 
        $text = implode(' ', $words);
 
        return $text;
 
    }
 
 
 
    $text = get_the_content('');
 
    $words = preg_split ("/\s+/u", $text);
 
    $post_content = $post->post_content;
 
    $post_content_length = count(preg_split("/\s+/u", $post_content));
 
 
 
// Build the excerpt from the post 
 
        $text = apply_filters('the_content', $text);
 
        $text = str_replace(']]>', ']]>', $text);
 
        $text = strip_tags($text, $bfa_ata['dont_strip_excerpts']);
 
        $excerpt_length = $bfa_ata['excerpt_length'];
 
        $words = preg_split("/\s+/u", $text, $excerpt_length + 1);
 
 
 
// this is to handle the case where the number of words 
 
// in the post equals the excerpt length
 
 
 
    if ($post_content_length > $excerpt_length) {   
 
        array_pop($words);  
 
//          array_pop($words);  
 
        $custom_read_more = str_replace('%permalink%', get_permalink(), $bfa_ata['custom_read_more']);
 
        $custom_read_more = str_replace('%title%', the_title('','',FALSE), $custom_read_more);
 
        array_push($words, $custom_read_more);
 
    }
 
    $text = implode(' ', $words);
 
    return $text;
 
 
 
    return $text;
 
}
 
remove_filter('get_the_excerpt', 'wp_trim_excerpt');
 
add_filter('get_the_excerpt', 'bfa_wp_trim_excerpt');
 
 
 
 
 
 
 
 
 
/* Custom widget areas. 
 
 
 
Usage:
 
<?php bfa_widget_area([parameters]); ?>
 
 
 
Example: 
 
<?php bfa_widget_area('name=My widget area&cells=4&align=1&align_2=9&align_3=7&width_4=700&before_widget=<div id="%1$s" class="header-widget %2$s">&after_widget=</div>'); ?>
 
 
 
Can be used anywhere in templates, and in theme option text areas that allow usage of PHP code.
 
 
 
Available paramaters:
 
 
 
Mandatory:
 
name                    Name under which all cells of this widget area will be listed at Site Admin -> Appearance -> Widgets
 
                            A widget area with 3 cells and a name of "My widget area" creates 3 widget cells which appear as
 
                            "My widget area 1", "My widget area 2" and "My widget area 3", 
 
                            with the CSS ID's "my_widget_area_1", "my_widget_area_2" and "my_widget_area_3". 
 
                        
 
Optional:
 
cells                       Amount of (table) cells. Each cell is a new widget area. Default: 1
 
align                       Default alignment for all cells. Default: 2 (= center top). 1 = center middle, 2 = center top, 3 = right top, 4 = right middle, 
 
                            5 = right bottom, 6 = center bottom, 7 = left bottom, 8 = left middle, 9 = left top.
 
align_1                 Alignment for cell 1: align_2, align_3 ... Non-specified cells get the default value of "align", which, if not defined, is 2 (= center top).
 
width_1             Width of cell 1: width_1, width_2, width_3 ... Non-specified cells get a equal share of the remaining width of the whole table
 
                            containing all the widget area cells.
 
before_widget       HTML before each widget in any cell of this widget area. Default:  <div id="%1$s" class="widget %2$s">
 
after_widget        HMTL after each widget ... Default: </div>
 
before_title            HTML before the title of each widget in any cell of this widget area: Default: <div class="widget-title"><h3>
 
after_title         HMTL after the title ... Default: </h3></div>
 
 
 
*/
 
function bfa_widget_area($args = '') {
 
    global $bfa_ata;
 
    $defaults = array(
 
        'name' => '',
 
        'cells' => 1,
 
        'align' => 2,
 
        'before_widget' => '<div id="%1$s" class="widget %2$s">',
 
        'after_widget' => '</div>',
 
        'before_title' => '<div class="widget-title"><h3>',
 
        'after_title' => '</h3></div>',
 
    );
 
    
 
    $r = wp_parse_args( $args, $defaults );
 
    extract( $r, EXTR_SKIP );
 
 
 
    $area_id = strtolower(str_replace(" ", "_", $r['name']));
 
    
 
    # $bfa_widget_areas = get_option('bfa_widget_areas');
 
    $bfa_widget_areas = $bfa_ata['bfa_widget_areas'];   
 
    
 
    // If there are more than 1 cell, use a table, otherwise just a DIV:
 
    if ( $r['cells'] > 1 ) {
 
    
 
        echo '<table id="' . $area_id . '" class="bfa_widget_area" style="table-layout:fixed;width:100%" cellpadding="0" cellspacing="0" border="0">';
 
 
 
        // If a width was set for any of the widget area cells:
 
        # if ( strpos($args,'width_') !== FALSE ) {
 
        
 
        // Since 3.6.7
 
        $colgroup = 'no'; // If all table cells have the same width, this can be achieved by table-layout:fixed alone, without the colgroup element.
 
        // Check if any of the cells have a set width
 
        for ( $i = 1; $i <= $r['cells']; $i++ ) { 
 
            if ( array_key_exists('width_' . $i, $r) AND !empty($r['width_' . $i]) ) {
 
                    $colgroup = 'yes';
 
            }
 
        }
 
        
 
        if ($colgroup == 'yes') {
 
            echo "\n<colgroup>";
 
            for ( $i = 1; $i <= $r['cells']; $i++ ) {
 
                echo '<col';
 
                $current_width = "width_" . $i;
 
                if ( $r[$current_width] ) {
 
                    echo ' style="width:' . $r[$current_width] . 'px"';
 
                }
 
                echo ' />';
 
            }
 
            echo "</colgroup>";
 
        }
 
        
 
        echo "<tr>";
 
        
 
        for ( $i = 1; $i <= $r['cells']; $i++ ) {
 
            
 
                $current_name = $r['name'] . ' ' . $i;
 
                $current_id = $area_id . '_' . $i;
 
                $current_align = "align_" . $i;
 
                
 
                echo "\n" . '<td id="' . $current_id .'" ';
 
                
 
                if ( $r[$current_align] ) 
 
                    $align_type = $r["$current_align"];
 
                else 
 
                    $align_type = $r['align'];
 
                
 
                echo bfa_table_cell_align($align_type) . ">";
 
                
 
                // Register widget area
 
                $this_widget_area = array(
 
                    "name" => $current_name,
 
                    "before_widget" => $r['before_widget'],
 
                    "after_widget" => $r['after_widget'],
 
                    "before_title" => $r['before_title'],
 
                    "after_title" => $r['after_title']
 
                    );
 
          
 
                // Display widget area
 
                dynamic_sidebar("$current_name"); 
 
                
 
                echo "\n</td>";
 
                
 
                $bfa_widget_areas[$current_name] = $this_widget_area;
 
        }
 
        
 
        echo "\n</tr></table>";     
 
    
 
    } else {
 
    
 
        // If only 1 widget cell, use a DIV instead of a table
 
        echo '<div id="' . $area_id . '" class="bfa_widget_area">';
 
        
 
        // Add new widget area to existing ones
 
        $this_widget_area = array(
 
            "name" => $r['name'],
 
            "before_widget" => $r['before_widget'],
 
            "after_widget" => $r['after_widget'],
 
            "before_title" => $r['before_title'],
 
            "after_title" => $r['after_title']
 
            );
 
 
 
        // Display widget area
 
        dynamic_sidebar($r['name']);    
 
 
 
        echo '</div>';
 
        
 
        $current_name = $r['name'];
 
        $bfa_widget_areas[$current_name] = $this_widget_area;
 
    
 
    }
 
 
 
    # update_option("bfa_widget_areas", $bfa_widget_areas);
 
    $bfa_ata['bfa_widget_areas'] = $bfa_widget_areas;
 
    update_option('bfa_ata4', $bfa_ata);
 
 
 
}
 
 
 
 
 
function bfa_table_cell_align($align_type) {
 
    switch ($align_type) {
 
        case 1: $string = 'align="center" valign="middle"'; break;
 
        case 2: $string = 'align="center" valign="top"'; break;
 
        case 3: $string = 'align="right" valign="top"'; break;      
 
        case 4: $string = 'align="right" valign="middle"'; break;
 
        case 5: $string = 'align="right" valign="bottom"'; break;
 
        case 6: $string = 'align="center" valign="bottom"'; break;
 
        case 7: $string = 'align="left" valign="bottom"'; break;
 
        case 8: $string = 'align="left" valign="middle"'; break;
 
        case 9: $string = 'align="left" valign="top"'; 
 
    }
 
    return $string;
 
}
 
    
 
 
 
// Since 3.4.3: Delete Widget Areas
 
function bfa_ata_reset_widget_areas() {
 
    global $bfa_ata;
 
    check_ajax_referer( "reset_widget_areas" );
 
    $delete_areas = $_POST['delete_areas'];
 
    # $current_areas = get_option('bfa_widget_areas');
 
    $current_areas = $bfa_ata['bfa_widget_areas'];
 
    foreach ($delete_areas as $area_name) {
 
        unset($current_areas[$area_name]);
 
    }
 
    # update_option('bfa_widget_areas', $current_areas);
 
    $bfa_ata['bfa_widget_areas'] = $current_areas;
 
    update_option('bfa_ata4', $bfa_ata);
 
    echo 'Custom widget areas deleted...'; 
 
    die();
 
}
 
// add_action ( 'wp_ajax_' + [name of "action" in jQuery.ajax, see functions/bfa_css_admin_head.php], [name of function])
 
add_action( 'wp_ajax_reset_bfa_ata_widget_areas', 'bfa_ata_reset_widget_areas' );
 
 
 
 
 
// Since 3.6.5: Import Settings
 
function bfa_ata_import_settings() {
 
    global $bfa_ata;
 
    check_ajax_referer( "import_settings" );
 
    
 
    // was encoded with encodeURIComponent in bfa_css_admin_head.php
 
    // $import_options = rawurldecode($_POST['options']);
 
    $import_options = stripslashes($_POST['ataoptions']);
 
    
 
    // Since 3.5.2, use JSON 
 
    if ( json_decode($import_options) != NULL AND strpos($import_options, 'use_bfa_seo') !== FALSE ) {
 
        update_option('bfa_ata4', json_decode($import_options, TRUE));
 
        echo "<strong><span style='color:green'>Success! Reloading admin area in 2 seconds... </span></strong><br />";      
 
    
 
    // Probably not a valid settings file:
 
    } else {
 
        echo "<strong><span style='color:red'>Sorry, but doesn't appear 
 
            to be a valid Atahualpa Settings File.</span></strong>";
 
            #print_r($import_options);
 
    }   
 
    
 
    die();
 
}
 
// add_action ( 'wp_ajax_' + [name of "action" in jQuery.ajax, see functions/bfa_css_admin_head.php], [name of function])
 
add_action( 'wp_ajax_import_settings', 'bfa_ata_import_settings' );
 
 
 
 
 
 
 
/* CUSTOM BODY TITLE and meta title, meta keywords, meta description */
 
if(isset($bfa_ata['page_post_options'])) {
 
    if ($bfa_ata['page_post_options'] == "Yes") {
 
    /* Use the admin_menu action to define the custom boxes */
 
        if (is_admin())
 
            add_action('admin_menu', 'bfa_ata_add_custom_box');
 
 
 
        /* Use the save_post action to do something with the data entered */
 
        add_action('save_post', 'bfa_ata_save_postdata');
 
    }
 
}
 
 
 
/* Use the publish_post action to do something with the data entered */
 
#add_action('publish_post', 'bfa_ata_save_postdata');
 
 
 
#add_action('pre_post_update', 'bfa_ata_save_postdata');
 
 
 
/* Adds a custom section to the "advanced" Post and Page edit screens */
 
function bfa_ata_add_custom_box() {
 
 
 
  if( function_exists( 'add_meta_box' )) {
 
    add_meta_box( 'bfa_ata_sectionid', __( 'Atahualpa Post Options', 'atahualpa' ), 
 
                'bfa_ata_inner_custom_box', 'post', 'normal', 'high' );
 
    add_meta_box( 'bfa_ata_sectionid', __( 'Atahualpa Page Options', 'atahualpa' ), 
 
                'bfa_ata_inner_custom_box', 'page', 'normal', 'high' );
 
   } else {
 
    add_action('dbx_post_advanced', 'bfa_ata_old_custom_box' );
 
    add_action('dbx_page_advanced', 'bfa_ata_old_custom_box' );
 
  }
 
}
 
   
 
/* Prints the inner fields for the custom post/page section */
 
function bfa_ata_inner_custom_box() {
 
 
 
    global $post;
 
    
 
  // Use nonce for verification
 
 
 
    echo '<input type="hidden" name="bfa_ata_noncename" id="bfa_ata_noncename" value="' . 
 
    wp_create_nonce( plugin_basename(__FILE__) ) . '" />';
 
 
 
  // The actual fields for data entry
 
  
 
    $thePostID = $post->ID;
 
    $post_id = get_post($thePostID);
 
#   $title = $post_id->post_title;
 
    $title = ($post_id->post_title !== 'Auto Draft') ? $post_id->post_title : '';
 
 
 
    $body_title = get_post_meta($post->ID, 'bfa_ata_body_title', true);
 
    if ( $body_title == '' ) {
 
        $body_title = $title;
 
    }
 
    $display_body_title = get_post_meta($post->ID, 'bfa_ata_display_body_title', true);
 
    $body_title_multi = get_post_meta($post->ID, 'bfa_ata_body_title_multi', true);
 
    if ( $body_title_multi == '' ) {
 
        $body_title_multi = $title;
 
    }
 
    $meta_title = get_post_meta($post->ID, 'bfa_ata_meta_title', true);
 
    $meta_keywords = get_post_meta($post->ID, 'bfa_ata_meta_keywords', true);
 
    $meta_description = get_post_meta($post->ID, 'bfa_ata_meta_description', true); 
 
 
 
    echo '<table cellpadding="5" cellspacing="0" border="0" style="table-layout:fixed;width:100%">';
 
    echo '<tr><td style="text-align:right;padding:2px 5px 2px 2px"><input id="bfa_ata_display_body_title" name="bfa_ata_display_body_title" type="checkbox" '. ($display_body_title == 'on' ? ' CHECKED' : '') .' /></td><td>Check to <strong>NOT</strong> display the Body Title on Single Post or Static Pages</td></tr>';
 
    echo '<tr><td style="text-align:right;padding:2px 5px 2px 2px"><label for="bfa_ata_body_title">' . __("Body Title Single Pages", 'atahualpa' ) . '</label></td>';
 
    echo '<td><input type="text" name="bfa_ata_body_title" value="' . $body_title . '" size="70" style="width:97%" /></td></tr>';
 
    echo '<tr><td style="text-align:right;padding:2px 5px 2px 2px"><label for="bfa_ata_body_title_multi">' . __("Body Title Multi Post Pages", 'atahualpa' ) . '</label></td>';
 
    echo '<td><input type="text" name="bfa_ata_body_title_multi" value="' . $body_title_multi . '" size="70" style="width:97%" /></td></tr>';
 
        
 
    echo '<colgroup><col style="width:200px"><col></colgroup>';
 
    echo '<tr><td style="text-align:right;padding:2px 5px 2px 2px"><label for="bfa_ata_meta_title">' . __("Meta Title", 'atahualpa' ) . '</label></td>';
 
    echo '<td><input type="text" name="bfa_ata_meta_title" value="' . 
 
    $meta_title . '" size="70" style="width:97%" /></td></tr>';
 
    
 
    echo '<tr><td style="text-align:right;padding:2px 5px 2px 2px"><label for="bfa_ata_meta_keywords">' . __("Meta Keywords", 'atahualpa' ) . '</label></td>';
 
    echo '<td><input type="text" name="bfa_ata_meta_keywords" value="' . 
 
    $meta_keywords . '" size="70" style="width:97%" /></td></tr>';
 
    
 
    echo '<tr><td style="text-align:right;vertical-align:top;padding:5px 5px 2px 2px"><label for="bfa_ata_meta_description">' . __("Meta Description", 'atahualpa' ) . '</label></td>';
 
    echo '<td><textarea name="bfa_ata_meta_description" cols="70" rows="4" style="width:97%">'.$meta_description.'</textarea></td></tr>';
 
    
 
    echo '</table>';
 
 
 
}
 
 
 
/* Prints the edit form for pre-WordPress 2.5 post/page */
 
function bfa_ata_old_custom_box() {
 
 
 
  echo '<div class="dbx-b-ox-wrapper">' . "\n";
 
  echo '<fieldset id="bfa_ata_fieldsetid" class="dbx-box">' . "\n";
 
  echo '<div class="dbx-h-andle-wrapper"><h3 class="dbx-handle">' . 
 
        __( 'Body copy title', 'atahualpa' ) . "</h3></div>";   
 
   
 
  echo '<div class="dbx-c-ontent-wrapper"><div class="dbx-content">';
 
 
 
  // output editing form
 
 
 
  bfa_ata_inner_custom_box();
 
 
 
  // end wrapper
 
 
 
  echo "</div></div></fieldset></div>\n";
 
}
 
 
 
 
 
 
 
/* When the post is saved, save our custom data */
 
function bfa_ata_save_postdata( $post_id ) {
 
 
 
  /* verify this came from the our screen and with proper authorization,
 
  because save_post can be triggered at other times */
 
 
 
  if ( !wp_verify_nonce( $_POST['bfa_ata_noncename'], plugin_basename(__FILE__) )) {
 
    return $post_id;
 
  }
 
 
 
  if ( 'page' == $_POST['post_type'] ) {
 
    if ( !current_user_can( 'edit_page', $post_id ))
 
      return $post_id;
 
  } else {
 
    if ( !current_user_can( 'edit_post', $post_id ))
 
      return $post_id;
 
  }
 
 
 
    // Save the data
 
    
 
    $new_body_title = $_POST['bfa_ata_body_title'];
 
    $new_display_body_title = !isset($_POST["bfa_ata_display_body_title"]) ? NULL : $_POST["bfa_ata_display_body_title"];
 
    $new_body_title_multi = $_POST['bfa_ata_body_title_multi'];
 
    $new_meta_title = $_POST['bfa_ata_meta_title'];
 
    $new_meta_keywords = $_POST['bfa_ata_meta_keywords'];
 
    $new_meta_description = $_POST['bfa_ata_meta_description'];
 
 
 
    update_post_meta($post_id, 'bfa_ata_body_title', $new_body_title);
 
    update_post_meta($post_id, 'bfa_ata_display_body_title', $new_display_body_title);
 
    update_post_meta($post_id, 'bfa_ata_body_title_multi', $new_body_title_multi);
 
    update_post_meta($post_id, 'bfa_ata_meta_title', $new_meta_title);
 
    update_post_meta($post_id, 'bfa_ata_meta_keywords', $new_meta_keywords);
 
    update_post_meta($post_id, 'bfa_ata_meta_description', $new_meta_description);
 
 
 
 
 
}
 
 
 
 
 
 
 
if ( function_exists( 'add_theme_support' ) ) { // Added in 2.9
 
 
 
    // Since 3.4.5: WP 2.9 thumbnails support:
 
    add_theme_support( 'post-thumbnails' );
 
    if ($bfa_ata['post_thumbnail_crop'] == "Yes") 
 
        set_post_thumbnail_size( $bfa_ata['post_thumbnail_width'], $bfa_ata['post_thumbnail_height'], true );
 
    else set_post_thumbnail_size( $bfa_ata['post_thumbnail_width'], $bfa_ata['post_thumbnail_height'] );
 
    add_image_size( 'single-post-thumbnail', 400, 9999 ); // Permalink thumbnail size
 
    
 
    // Since 3.5.4:
 
    add_theme_support('automatic-feed-links');
 
}
 
 
 
 
 
// Since 3.4.7: Import/Export Settings
 
function bfa_import_settings_now() {
 
    check_ajax_referer( "import_bfa_settings" );
 
    $new_options = maybe_unserialize(bfa_file_get_contents($_FILES['userfile']['tmp_name']));
 
    update_option('bfa_new_test', $new_options);
 
    die();
 
}
 
// add_action ( 'wp_ajax_' + [name of "action" in jQuery.ajax, see functions/bfa_css_admin_head.php], [name of function])
 
add_action( 'wp_ajax_import_bfa_settings_now', 'bfa_import_settings_now' );
 
 
 
 
 
 
 
// Since 3.5.2: New menu system in WP 3
 
if (function_exists('register_nav_menus')) {
 
add_action( 'init', 'bfa_register_new_menus' );
 
    function bfa_register_new_menus() {
 
        register_nav_menus(
 
            array(
 
                'menu1' => __( 'Menu 1','atahualpa' ),
 
                'menu2' => __( 'Menu 2','atahualpa' )
 
            )
 
        );
 
    }
 
}
 
 
 
// Since 3.5.4: Add odd/even class to WP's post_class
 
add_filter ( 'post_class' , 'bfa_post_class' );
 
global $current_class;
 
$current_class = 'odd';
 
 
 
function bfa_post_class ( $classes ) {
 
    global $current_class;
 
    $classes[] = $current_class;
 
    $current_class = ($current_class == 'odd') ? 'even' : 'odd';
 
    return $classes;
 
}
 
 
 
// Since 3.6: Use stream wrapper instead of eval to include user code. Not used anymore since 3.6.5
 
class bfa_VariableStream {
 
    var $position;
 
    var $varname;
 
 
 
    function stream_open($path, $mode, $options, &$opened_path)
 
    {
 
        $url = parse_url($path);
 
        $this->varname = $url["host"];
 
        $this->position = 0;
 
 
 
        return true;
 
    }
 
 
 
    function stream_read($count)
 
    {
 
        $ret = substr($GLOBALS[$this->varname], $this->position, $count);
 
        $this->position += strlen($ret);
 
        return $ret;
 
    }
 
 
 
    function stream_write($data)
 
    {
 
        $left = substr($GLOBALS[$this->varname], 0, $this->position);
 
        $right = substr($GLOBALS[$this->varname], $this->position + strlen($data));
 
        $GLOBALS[$this->varname] = $left . $data . $right;
 
        $this->position += strlen($data);
 
        return strlen($data);
 
    }
 
 
 
    function stream_tell()
 
    {
 
        return $this->position;
 
    }
 
 
 
    function stream_eof()
 
    {
 
        return $this->position >= strlen($GLOBALS[$this->varname]);
 
    }
 
 
 
    function stream_seek($offset, $whence)
 
    {
 
        switch ($whence) {
 
            case SEEK_SET:
 
                if ($offset < strlen($GLOBALS[$this->varname]) && $offset >= 0) {
 
                     $this->position = $offset;
 
                     return true;
 
                } else {
 
                     return false;
 
                }
 
                break;
 
 
 
            case SEEK_CUR:
 
                if ($offset >= 0) {
 
                     $this->position += $offset;
 
                     return true;
 
                } else {
 
                     return false;
 
                }
 
                break;
 
 
 
            case SEEK_END:
 
                if (strlen($GLOBALS[$this->varname]) + $offset >= 0) {
 
                     $this->position = strlen($GLOBALS[$this->varname]) + $offset;
 
                     return true;
 
                } else {
 
                     return false;
 
                }
 
                break;
 
 
 
            default:
 
                return false;
 
        }
 
    }
 
 
 
    function stream_stat() 
 
    {
 
        return array('size' => strlen($GLOBALS[$this->varname]));
 
    } 
 
 
 
    function url_stat() 
 
    {
 
        return array();
 
    }
 
 
 
}
 
 
 
// Since 3.6: Register stream wrapper 'bfa'
 
stream_wrapper_register("bfa", "bfa_VariableStream")
 
    or die("Failed to register new stream protocol 'bfa'");
 
 
 
// Since 3.6: Make sure $GLOBALS has all values
 
foreach($bfa_ata as $key => $value) {
 
    $GLOBALS[$key] = $value;
 
}
 
 
 
// Since 3.6: New variables using newer WP functions
 
$templateURI = get_template_directory_uri(); 
 
// Since 3.7.0: Escape home_url, too
 
$homeURL = esc_url( home_url() );
 
 
 
// Since 3.6: Include Javascripts here and with wp_enqueue instead of header.php
 
$isIE6 = (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6.') !== FALSE);
 
 
 
// Since 3.7.4: Enqueue with add_action
 
function bfa_enqueue_scripts() {
 
    global $isIE6, $bfa_ata;
 
    $templateURI = get_template_directory_uri(); 
 
 
 
    
 
    if ( !is_admin() ) { 
 
        
 
        wp_enqueue_script('jquery');
 
 
 
        if ($bfa_ata['pngfix_selectors'] != "" AND $isIE6 = TRUE) 
 
        {
 
            wp_register_script('ddroundies', $templateURI . '/js/DD_roundies.js', false, '0.0.2a' );
 
            wp_enqueue_script('ddroundies');
 
            add_action('wp_head', 'bfa_ddroundiesHead');
 
        }
 
        
 
        if (strpos($bfa_ata['configure_header'],'%image')!== FALSE AND $bfa_ata['header_image_javascript'] != "0" 
 
        AND $bfa_ata['crossslide_fade'] != "0") {
 
            wp_register_script('crossslide', $templateURI . '/js/jquery.cross-slide.js', array('jquery'), '0.3.2' );
 
            wp_enqueue_script('crossslide');
 
        }
 
    }
 
}
 
add_action('wp_enqueue_scripts', 'bfa_enqueue_scripts'); // For use on the Front end (ie. Theme)
 
 
 
 
 
 
 
// Since 3.6.1: Add ddroundies script in head this way:
 
function bfa_ddroundiesHead() {
 
    global $bfa_ata;
 
    echo '
 
<!--[if IE 6]>
 
<script type="text/javascript">DD_roundies.addRule("' . $bfa_ata['pngfix_selectors'] . '");</script>
 
<![endif]-->
 
';
 
}
 
 
 
// Since 3.6: Content Width
 
if ( ! isset( $content_width ) )
 
    $content_width = 640;
 
 
 
// editor style, custom background & custom image header not activted yet. background & header work
 
// Atahualpa has most of this - confusing to have 2 places to set header images etc. ?
 
/*
 
add_editor_style();
 
add_custom_background(); 
 
 
 
 
 
define('HEADER_TEXTCOLOR', 'ffffff');
 
define('HEADER_IMAGE', '%s/images/header/header6.jpg'); 
 
define('HEADER_IMAGE_WIDTH', 775); 
 
define('HEADER_IMAGE_HEIGHT', 200);
 
 
 
function header_style() {
 
    ?><style type="text/css">
 
        #header {
 
            background: url(<?php header_image(); ?>);
 
        }
 
    </style><?php
 
}
 
 
 
function admin_header_style() {
 
    ?><style type="text/css">
 
        #headimg {
 
            width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
 
            height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
 
        }
 
    </style><?php
 
}
 
add_custom_image_header('header_style', 'admin_header_style');
 
 
 
register_default_headers( array(
 
    'header6' => array(
 
        'url' => '%s/images/header/header6.jpg',
 
        'thumbnail_url' => '%s/images/header/header6-thumb.jpg',
 
        'description' => __( 'Raspberry', 'twentyten' )
 
    ),
 
    'IMG_1479' => array(
 
        'url' => '%s/images/header/IMG_1479.jpg',
 
        'thumbnail_url' => '%s/images/header/IMG_1479-thumb.jpg',
 
        'description' => __( 'Apple Blossom', 'twentyten' )
 
    ),
 
    'IMG_1496.jpg' => array(
 
        'url' => '%s/images/header/IMG_1496.jpg',
 
        'thumbnail_url' => '%s/images/header/IMG_1496-thumb.jpg',
 
        'description' => __( 'Spring', 'twentyten' )
 
    )
 
) );
 
 
 
*/
 
 
 
// Since 3.6.5: Process or don't process user included PHP code. 
 
function bfa_incl($option) {
 
 
 
    global $bfa_ata;
 
    
 
    $result = bfa_parse_widget_areas($bfa_ata[$option]);
 
 
 
    echo $result;
 
}
 
 
 
 
 
function bfa_parse_widget_areas($content) {
 
                
 
    if ( strpos($content,'<?php bfa_widget_area') !== FALSE ) {
 
        $content = preg_replace_callback("/<\?php bfa_widget_area(.*?)\((.*?)'(.*?)'(.*?)\)(.*?)\?>/s","bfa_parse_widget_areas_callback",$content);
 
    }
 
 
 
    return $content; 
 
}   
 
 
 
 
 
// Callback for preg_replace_callback
 
function bfa_parse_widget_areas_callback($matches) {
 
 
 
    parse_str($matches[3], $widget_options);
 
    
 
    ob_start(); 
 
    
 
        bfa_widget_area($widget_options);
 
        $widget_area = ob_get_contents();
 
        
 
    ob_end_clean();
 
    
 
    return $widget_area;
 
}
 
 
 
function bfa_is_pagetemplate_active($pagetemplate = '') {
 
 
 
    if ($pagetemplate == '') {return 0;}
 
    
 
    global $wpdb;
 
    $sql = "select meta_key from $wpdb->postmeta where meta_key like '_wp_page_template' and meta_value like '" . $pagetemplate . "'";
 
    $result = $wpdb->query($sql);
 
    if ($result) {
 
        return 1;
 
    } else {
 
        return 0;
 
    }
 
}
 
 
 
?>
И фрагмент с пермалинком
PHP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
    if ( '' <> $text ) {
 
//  an manual excerpt exists, stick on the 'custom read more' and we're done
 
        $words = preg_split("/\s+/u", $text);
 
        $custom_read_more = str_replace('%permalink%', get_permalink(), $bfa_ata['custom_read_more']);
 
        if ( get_the_title() == '' ) { 
 
            $custom_read_more = str_replace('%title%', 'Permalink', $custom_read_more);
 
        } else {        
 
            $custom_read_more = str_replace('%title%', the_title('','',FALSE), $custom_read_more);
 
        }
 
        array_push($words, $custom_read_more);
 
        $text = implode(' ', $words);
 
        return $text;
 
    }
0
Coding is art
Эксперт JS
536 / 420 / 153
Регистрация: 04.09.2013
Сообщений: 1,056
10.11.2013, 00:19 6
Так, могу пояснить несколько моментов
Во первых если в теме есть файл Archive.php ( или Category.php ) то для вывода записей в категориях используется он и нужно смотреть его.
Во вторых если вы видите get_the_excerpt() или the_excerpt() - то эта функция выводит контент, но обрезая все теги ( a, span, strong и т.п. ) или же если вы видете функию strip_tags( the_content() ) ( да вообще strip_tags() ) то это значит что содердимое передаваемое в эту функцию так же убирается теги ( a, span, stron и т.п. )
Если используется функция the_content() или get_the_content() и всё равно выводиться без тегов, то значит где-то в теме используется фильтр add_filter( 'the_content', '...' ); в котором используется strip_tags() функция..

Нужно смотреть чательно файлы темы и искать где что не так выводиться..

Решения: если увидете что используется the_excerpt() или get_the_excerpt() то меняйте на the_content() и get_the_content() соответственно..
если увидите функицю strip_tags() попробуйте убрать её ( если не помогло не забудьте вернуть обратно )
1
10.11.2013, 00:19
IT_Exp
Эксперт
87844 / 49110 / 22898
Регистрация: 17.06.2006
Сообщений: 92,604
10.11.2013, 00:19
Помогаю со студенческими работами здесь

Код в представлении генерирует ссылки на категории товаров: при щелчке по категории идёт 404 ошибка
плин Добавлено через 14 секунд Этот код в представлении генерирует ссылки на категории товаров...

вопрос про ссылки на морду со страницы категории
со всех внутренних страниц ставлю ссылку на морду. но на сайте существуют категории ( тоесть...

Купленные ссылки не отображаются
Добрый день, уважаемые форумчане :) Купил на бирже gogetlinks пару ссылок на свой сайт. Ссылки...

Автоматически исправлять ссылки, добавляя в них ярлык категории
Доброго дня, всех с наступающим! Вопрос следующий. Переходим на новый сайт и хочется сохранять...


Искать еще темы с ответами

Или воспользуйтесь поиском по форуму:
6
Ответ Создать тему
Опции темы

КиберФорум - форум программистов, компьютерный форум, программирование
Powered by vBulletin
Copyright ©2000 - 2024, CyberForum.ru