Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1195651
    fmgrafikdesign
    Participant

    Hi there,

    In your page options you have the option “alternative index title”, but it does not change the title on the search page or in my loops. How can I retrieve that alternative title?

    Best Regards,
    Fabian

    #1195667
    fmgrafikdesign
    Participant

    Found the solution myself, I’ll post it for anyone interested:

    //Use the alternative index title specified in page options
    function fm_alternative_index_title($title) {
        //Only if currently looping
        if(in_the_loop()) {
            $page = get_page_by_title($title);
            if ($p = get_post_meta($page->ID, "_x_entry_alternate_index_title", true)) {
                $title = $p;
            }
        }
        return $title;
    }
    add_filter('the_title', 'fm_alternative_index_title', 10, 1);
    #1195684
    Joao
    Moderator

    Hi There,

    Thanks for your input.

    Let us know if you need help with anything else.

    Joao

  • <script> jQuery(function($){ $("#no-reply-1195651 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>