Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter sipoax

    (@sipoax)

    Thank you! It works like a charm!

    Thread Starter sipoax

    (@sipoax)

    Hmmm It’s my fault. Your plugin works perfectly.

    I checked function.php and found that I had added a few lines of code. Looks like something is not ok with what I added.

    add_filter( 'a_z_listing_item_index_letter', 'my_a_z_index_filter', 10, 3 );
    
    function my_a_z_index_filter( $index_letters, $item, $item_type ) {
        // make sure we're filtering the right post type
        if ( 'page' === get_post_type( $item ) ) {
            // pull the title and get the first letter of the second word
            $full_name = explode( ' / ', $item->post_title );
    
            // the last word is in the last element of $title_parts so check it is there
            $last_name = array_pop( $full_name );
    
            // ensure we actually found a last name
            if ( $last_name )  {
                // cut the first letter out for our index
                $index = substr( $last_name, 0, 1 );
    
                // set up a new empty array overwriting the old indices
                $index_letters = array( $index );
            }
        }
    
        // return the indices item's indices
        return $index_letters;
    }

    Can you please help me?

    I’m using this code in another index on the site. I need to remove the first two words in the title so that the sorting is done by the third word. Something like this:

    XXX YYY A
    XXX YYY B
    XXX YYY C

    I do not want all articles to appear in X, but depending on A, B, C I want titles to appear in letter A, B, C.

    The above code works for this need but it seems that it disturbs the diacritics in the title.

    Thread Starter sipoax

    (@sipoax)

    ignore this message, see the following message!

    I think I found the problem, but I don’t know how to fix it.

    I use the OceanWP theme and I use the child theme. With the child theme enabled, the problem above appears. If I only activate OceanWP (without the child theme) the AZ Listing theme it works perfectly.


    Maybe you have any suggestions?

    • This reply was modified 4 years, 11 months ago by sipoax.
    • This reply was modified 4 years, 11 months ago by sipoax.
    Thread Starter sipoax

    (@sipoax)

    I tried both codes below:

    [a-z-listing display="posts" alphabet="Aáà?aáà?,??,?a,Bb,C?c?,Dd,Eéè?êeéè?ê,Ff,Gg,Hh,Iíì?iíì?,??,Jj,Kk,Ll,Mm,Nn,Oóò??oóò??,Pp,Qq,Rr,Ss?,??,Tt,??,Uúùü?uúùü?,Vv,Ww,Xx,Yy,Zz" post-type="page"]

    [a-z-listing display="posts" alphabet="Aáà???aáà?a?,Bb,Cc,Dd,Eéè?êeéè?ê,Ff,Gg,Hh,Iíì??iíì??,Jj,Kk,Ll,Mm,Nn,Oóò??oóò??,Pp,Qq,Rr,Ss???,Tt??,Uúùü?uúùü?,Vv,Ww,Xx,Yy,Zz" post-type="page"]

    The first code to differentiate ?? from Ss, ?? from Tt, ?? from Aa, ?? from Aa, ?? from Ii.

    The second to try to include ?? in Ss, ?? in Tt, ?? in Aa, ?a in Aa, ?? in Ii

    The result is the same: articles are entered at #

    Thread Starter sipoax

    (@sipoax)

    You are right. The problem was with mod_security. I solved the problem with the host, who changed the filter.

    If someone has such a problem, it can be temporarily fixed by disabling mod-security.

    The issue should be discussed with the host. They are able to solve such a problem.

    Anyway thanks for the reply, @bcworkz.

    Try this, for me it worked:
    edit Watu CSS: wp-content/plugins/watu/style.css

    locate this
    /* The following is override for themes that set radios and checkboxes on their own line */
    .quiz-form label,
    .quiz-form input[type=”checkbox”],
    .quiz-form input[type=”radio”] {
    display: inline !important;
    }

    change display: inline !important; with display: inline-block !important;

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