• Resolved aljuk

    (@aljuk)


    There is a problem with archive title templates.

    Here’s an illustrative example:
    %%term_title%% %%current_pagination%% %%sep%% %%sitetitle%%

    Page 2 and above is fine, but page 1 is not.

    On page 1 the above template renders a double space before the separator, which looks awful, very amateur.

    A better approach might be to set this up for usage as:
    %%term_title%%%%current_pagination%% %%sep%% %%sitetitle%%
    – where %%current_pagination%% contains a space as its first character of output.

    Could you have a look at this please, and create a solution?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Benjamin Denis

    (@rainbowgeek)

    Hi,

    to solve this, paste this snippet to your functions.php:

    function sp_titles_title($html)
    {
        //you can add here all your conditions as if is_page(), is_category() etc..
        $html = implode(' ', array_filter(explode(" ", $html)));
        return $html;
    }
    add_filter('seopress_titles_title', 'sp_titles_title');
    Thread Starter aljuk

    (@aljuk)

    Excellent, many thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Problem with archive title templates’ is closed to new replies.