Before you ask please READ THIS

Rite main menu

hello, I have a started with Rite some weeks ago and i have prepared a prototype for my web site https://uwebrendelphotoprojects.live-website.com/. Now I have two questions:

I have build a main menu with a lot of submenues. For the most submeues the function box "mark this menu as pure text" works well (for example menues: Ausstellung, Event, etc.). Only for menues at the end of the menu (and menu list) I can check the regarding check box, burt the checked box will not be stored and the submenu und the subsubmenues will not work (for example: SW.) Finally I don't want to use the down and right arrow function. It looks like a dimensioning problem or a to small array for submenues. Do you have an idea?

Second question is regading the album function. I have to album lists: Alben und Alle Alben in the header menu. Alben works with 30 albums, this is a standard parameter (max. for album list). Alle Alben is a catogorized album list (with all albums selected), that works with only 10 albums per page. I have not found any parameter to increase this number. 30 albums (as for standard album list) would be used, may be together with the same parameter, 50 albums would be excellent. I have not found such a parameter.

I hope you understand my questions, if not I can explain it more detailed, if neccessary with screen shots. If you have questions or remark, let me know.

Comments

  • AirAir
    Posts: 10,732
    Hey :-)

    If you have a very big menu(like yours), server will not be able to store everything, because of the specific settings of the server.

    Please see this answer to apply solution on your server https://support.apollo13.eu/discussion/comment/23609/#Comment_23609

    UweBrendel said: Alle Alben is a catogorized album list (with all albums selected), that works with only 10 albums per page. I have not found any parameter to increase this number. 30 albums (as for standard album list) would be used, may be together with the same parameter, 50 albums would be excellent. I have not found such a parameter.
    All albums list will use the same "Items per page" setting. You can set it in Customizing ▸ Albums settings ▸ Albums list ▸ Items per page. There you can set it to 50 if you like. You can enter value "50" in to the input, as slider ends at value "30".

    With kind regards.
  • AirAir
    Posts: 10,732
    Thank you very much for your feedback.

    I try to get in touch with my provider. I guess they must change server parameters.

    Regarding the 2nd question, your solution works fine with the standard list (as ALBEN on my home page with 200 items).

    But if I use a categorized list from the menu setup the limitation still stays at 10, as you see on my ALLE ALBEN menu entry or in all other menu entries with selective album lists

    Do you have any idea
    Hey :-)

    Indeed I have tested, and in the case of categories, the limit per page doesn't work, as it depends on the default WordPress query, and this query does not respect this limit.

    I will have to investigate how to do it delicate way, to not ruin anything.

    I will let you know as soon as I will find a solution.

    PS. Please reply on the forum, as otherwise your replies might get lost.

    With kind regards.
  • Thank, setting up the php.ini helped to finalize my menu setup!

    and regarding the second question, i am looking forward ti hear from you. Good luck!
  • AirAir
    Posts: 10,732
    Hey :-)

    Please add such code in the functions.php file in the theme directory.

    Add it after such a line:
    /* Here you can insert your functions, filters and actions. */

    Code to add:
    add_action('pre_get_posts','apollo13framework_albums_and_works_limit');
    /**
     * Function that changes query for CPT taxonomies, to respect limit of posts per page
     *
     * @param WP_Query $query
     */
    function apollo13framework_albums_and_works_limit( $query ) {
        global $apollo13framework_a13;
    
        if ( is_admin() || ! $query->is_main_query() ){
            return;
        }
    
        $work_taxonomy = A13FRAMEWORK_CPT_WORK_TAXONOMY;
        $album_taxonomy = A13FRAMEWORK_CPT_ALBUM_TAXONOMY;
    
        if( property_exists($query, 'query') && array_key_exists( $album_taxonomy, $query->query ) ){
            $_per_page = $apollo13framework_a13->get_option( 'albums_list_items_per_page' );
    
            $query->set( 'posts_per_page', $_per_page);
    
        }
        elseif( property_exists($query, 'query') && array_key_exists( $work_taxonomy, $query->query ) ){
            $_per_page = $apollo13framework_a13->get_option( 'works_list_items_per_page' );
    
            $query->set( 'posts_per_page', $_per_page);
        }
    }
    I have tested this code, and it works well for me. Please test it as well, and I will add this also to the next update.

    With kind regards.
  • Thank you Air, I will try and check it. I will give you feedback, when I am ready!
  • Kind regards
    Uwe
  • I have tested this code with my homepage and everything worked well. Thaks a lot!
  • AirAir
    Posts: 10,732
    Great to hear that. I hope it will stay this way!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!