• Resolved a4aLien

    (@a4alien)


    Hello,

    I am using “Aegean Resort” theme, which is a commercial and as you said, possibly a non-supported theme.

    Everything is working 100% except a dropdown where the titles of the “Rooms” (Rooms are special/modded Pages from what I know).

    The output shows:

    {:en}abc xyz{:}{:ar}ا ب ت{:}
    instead of “abc xyz” (the page title)

    This is true in both languages.

    The developers of the theme tell me that they’re using a modded version of wp_dropdown_pages() called wp_dropdown_posts() … In developer’s words:

    The function that creates the room listing dropdown is a modified version of wp_dropdown_pages() made to display rooms. Ask the developer why the plugin outputs a string instead of the correct language when wp_dropdown_pages() is used and how you might fix this.

    Their templates look something like this:

    wp_dropdown_posts(array(
    'id' => 'room_select',
    'post_type' => 'room',
    'selected' => $selected
    ), 'room_select' );

    at another location:

    wp_dropdown_posts(array(
    'id' => 'room_select_2',
    'post_type' => 'room',
    'selected' => $room_id
    ), 'room_select' );

    Can you guide me in the right direction?

    https://ww.wp.xz.cn/plugins/wpglobus/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Alex Gor

    (@alexgff)

    Hello a4aLien
    I can’t help you without seeing theme’s code

    Thread Starter a4aLien

    (@a4alien)

    @alex Gor,

    I have uploaded the theme here. Please take out some time and look into their code?

    Plugin Support Alex Gor

    (@alexgff)

    in file wp_aegean5-v2.1.2\panel\generic.php
    after line 1026
    $pages = get_posts($r);
    add
    $pages = apply_filters('ci_get_posts', $pages);

    and at end of functions.php add piece of code

    if ( class_exists('WPGlobus') ) {
    		add_filter('ci_get_posts', 'on_wpglobus_get_posts' );
    		function on_wpglobus_get_posts( $pages ) {
    			foreach( $pages as &$page ) {
    				$page->post_title = WPGlobus_Core::text_filter( $page->post_title, WPGlobus::Config()->language );
    			}
    			return $pages;
    		}
    	}

    Thread Starter a4aLien

    (@a4alien)

    Tsk Alex..

    Didn’t expect it this soon 🙁

    I just paid a developer $30 to fix it..

    Here is what he did:

    //My Custom Functions
     add_filter('list_pages', 'my_list_pages',10,2);
     function my_list_pages($title,$page){
       return WPGlobus_Core::text_filter($title,WPGlobus::Config()->language);

    }

    Thread Starter a4aLien

    (@a4alien)

    Both of the solutions are working perfectly fine!

    Now I feel bad of having to pay him while you people deserve all the credit 🙁

    Plugin Support Alex Gor

    (@alexgff)

    @a4alien
    in any case I’ll be glad to see five stars review at
    https://ww.wp.xz.cn/support/view/plugin-reviews/wpglobus

    Thread Starter a4aLien

    (@a4alien)

    @alex

    Done. Much appreciated all that you’re doing!

    Thank you (from my heart)

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

The topic ‘Titles in Dropdown showing raw strings’ is closed to new replies.