• Hey! Great plugin, but I can’t figure out how to remove it so that the site name is not added to the {title}?

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi

    At the moment, there is only one way to achieve this.

    If you are using version 1.x (from www.ads-software.com), you can use

    add_filter('bsi_text', function($text) {
    	$text = explode('-', $text);
    	$text = trim($text[0]);
    	return $text;
    });

    If you are using version 2.x (from github) you can do the same thing, but with a different filter name.

    add_filter('bsi_image_text', function($text) {
    	$text = explode('-', $text);
    	$text = trim($text[0]);
    	return $text;
    });

    Please note that the ‘-‘ in this code is not a simple dash, and it might even not be a dash in your website (as it depends on the settings of your website);

    you can take this character from the actual title you see now (and can edit) in the BSI interface with a post or page.

    It could even be that your website title is in front of the post title, in that case you would want element [1] instead of [0].

    Place the code in an mu-plugin and you’re good to go.

    Regards,

    Remon.

    Thread Starter w1nkeyorg

    (@w1nkeyorg)

    Thanks!

    Correctly, I understood that I need to place the code for version 2.x in a file at wp-admin/includes/plugin.php ?

    • This reply was modified 1 year, 10 months ago by w1nkeyorg.

    Hi @w1nkeyorg

    No, please do not change that file. the wp-admin files are WordPress core. You never ever want to touch those (unless searching for information)

    You will want to go to the wp-content directory, see if there is a directory called mu-plugins there. (you will see plugins and themes, at least, to verify you are in the correct directory). If there is no directory called mu-plugins, create it.

    Then go to that directory and create a file called (for example) bsi-filters.php

    Then open it and place the code inside. And obviously, the file will start with a php-open-tag ( <?php )

    Then you should be good to go ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add site name at the end of each post’ is closed to new replies.