Title: i.lychkov's Replies | WordPress.org

---

# i.lychkov

  [  ](https://wordpress.org/support/users/ilychkov/)

 *   [Profile](https://wordpress.org/support/users/ilychkov/)
 *   [Topics Started](https://wordpress.org/support/users/ilychkov/topics/)
 *   [Replies Created](https://wordpress.org/support/users/ilychkov/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/ilychkov/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/ilychkov/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/ilychkov/engagements/)
 *   [Favorites](https://wordpress.org/support/users/ilychkov/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 87 total)

1 [2](https://wordpress.org/support/users/ilychkov/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/ilychkov/replies/page/3/?output_format=md)
[4](https://wordpress.org/support/users/ilychkov/replies/page/4/?output_format=md)
[5](https://wordpress.org/support/users/ilychkov/replies/page/5/?output_format=md)
[6](https://wordpress.org/support/users/ilychkov/replies/page/6/?output_format=md)
[→](https://wordpress.org/support/users/ilychkov/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Mark New Posts] markup still shows up](https://wordpress.org/support/topic/markup-still-shows-up/)
 *  Plugin Author [i.lychkov](https://wordpress.org/support/users/ilychkov/)
 * (@ilychkov)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/markup-still-shows-up/#post-18171242)
 * Hi! It seems like your theme or some of your plugins apply URL-escaping to post
   titles after they get processed by Mark New Posts, which causes the problem. 
   I’ll have to see what I can do about this issue.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Mark New Posts] Title duplicate on image](https://wordpress.org/support/topic/title-duplicate-on-image/)
 *  Plugin Author [i.lychkov](https://wordpress.org/support/users/ilychkov/)
 * (@ilychkov)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/title-duplicate-on-image/page/2/#post-17411698)
 * You’re very kind, thank you! And thank you so much for the review.
 * Well, a bit disappointing that there was no success, but it’s been pleasure investigating
   this case with you, haha. Feel free to contact me anytime. Cheers!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Mark New Posts] Title duplicate on image](https://wordpress.org/support/topic/title-duplicate-on-image/)
 *  Plugin Author [i.lychkov](https://wordpress.org/support/users/ilychkov/)
 * (@ilychkov)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/title-duplicate-on-image/page/2/#post-17409578)
 * Hi, sorry for leaving you hanging!
 * As I understood, enabling the checkbox “Allow outside the post list”, which is
   supposed to make my plugin only work in the Loop, makes it so the New marks stop
   appearing in the blog’s post list, and yet they still keep appearing (in a glitched
   form) in the WP Bakery widget. The only thing I can suppose is that the post 
   list in WP Bakery is considered to be in the Loop, while the blog’s list isn’t(
   which is kinda wild). So there’s no way for my plugin to determine that it should
   not be active in WP Bakery.
 * It seems to me that my plugin in its current form cannot be integrated with Ronneby
   or WP Bakery. Sorry 🙁
 * You can try contacting the theme’s support, but the problem seems a bit fundamental
   to be resolved right away – or at all. However, maybe they might suggest something
   after all.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Mark New Posts] Title duplicate on image](https://wordpress.org/support/topic/title-duplicate-on-image/)
 *  Plugin Author [i.lychkov](https://wordpress.org/support/users/ilychkov/)
 * (@ilychkov)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/title-duplicate-on-image/#post-17406656)
 * Please also try this one – in the same place in the .js file.
 *     ```wp-block-code
           for (var j = 0; j < el.childNodes.length; j++) {
               var n = el.childNodes[j];
               if (n.nodeType === 3 && n.nodeValue.indexOf('<mnp-mark>') !== -1)
                   n.nodeValue = n.nodeValue.replace('<mnp-mark>', '').replace('</mnp-mark>', '');
           }
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Mark New Posts] Title duplicate on image](https://wordpress.org/support/topic/title-duplicate-on-image/)
 *  Plugin Author [i.lychkov](https://wordpress.org/support/users/ilychkov/)
 * (@ilychkov)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/title-duplicate-on-image/#post-17406550)
 * I see. Well, let’s try this. Open wp-content\plugins\mark-new-posts\js\mark-new-
   posts.js, then _after_ the 9th line add the following:
 *     ```wp-block-code
       		for (var j = 0; j < el.childNodes.length; j++) {
       			var n = el.childNodes[j];
       			if (n.nodeType === 3 && n.nodeValue.indexOf('&lt;mnp-mark&gt;') !== -1)
       				n.nodeValue = n.nodeValue.replace('&lt;mnp-mark&gt;', '').replace('&lt;/mnp-mark&gt;', '');
       		}
       ```
   
 * After you’ve done editing the file, refresh the blog’s page with Ctrl+F5 (otherwise
   the old cached version of the js file will stay).
 * It’s a bit hacky, but if it will fix the markup, I’ll add it to the plugin.
 * Question: do you need the “New” markers to show at all in Custom WP Bakery? It’s
   going to be rather problematic if there’s a need for that.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Mark New Posts] Title duplicate on image](https://wordpress.org/support/topic/title-duplicate-on-image/)
 *  Plugin Author [i.lychkov](https://wordpress.org/support/users/ilychkov/)
 * (@ilychkov)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/title-duplicate-on-image/#post-17406469)
 * Try turning off “Allow outside the post list”, does it help?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Mark New Posts] Title duplicate on image](https://wordpress.org/support/topic/title-duplicate-on-image/)
 *  Plugin Author [i.lychkov](https://wordpress.org/support/users/ilychkov/)
 * (@ilychkov)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/title-duplicate-on-image/#post-17405440)
 * Okay, this is good! Though I can’t understand the remaining problem yet. Please
   explain it a bit more.
 * Also, let’s do another edit. Remove the ‘#’ character we added earlier and instead
   on line 63 change the number 10 to 100. Like this:
 * `add_filter('wp_footer', array(&$this, 'marker_template'), 100, 2);`
 * Tell me if the initial problem returns after doing this.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Mark New Posts] Title duplicate on image](https://wordpress.org/support/topic/title-duplicate-on-image/)
 *  Plugin Author [i.lychkov](https://wordpress.org/support/users/ilychkov/)
 * (@ilychkov)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/title-duplicate-on-image/#post-17405260)
 * You don’t have to go through all the cases anymore! Thank you for the effort.
   Just leave “Use JavaScript for showing markers” enabled.
 * Now I have to ask you to try adding some temporary edits in the plugin’s code.
   Open wp-content\plugins\mark-new-posts\mark-new-posts.php. Go to line 259. Add
   the symbol “#” in the beginning of the line, so it should become
 * `# if (!$this->new_posts_displayed) return;`
 * Tell me if the problem persists, and the console output too.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Mark New Posts] Title duplicate on image](https://wordpress.org/support/topic/title-duplicate-on-image/)
 *  Plugin Author [i.lychkov](https://wordpress.org/support/users/ilychkov/)
 * (@ilychkov)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/title-duplicate-on-image/#post-17404965)
 * Ah, I wish I could visit Italy one day!
 * Please do the following: open your blog page, wait for it to load, press F12,
   open Console, paste this:
 * `document.getElementsByClassName('mnp-unread')[0]`
 * and press Enter. Send me the response from the console.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Mark New Posts] Title duplicate on image](https://wordpress.org/support/topic/title-duplicate-on-image/)
 *  Plugin Author [i.lychkov](https://wordpress.org/support/users/ilychkov/)
 * (@ilychkov)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/title-duplicate-on-image/#post-17403322)
 * You’re welcome, that’s no problem at all!
 * So the problem is that the theme appears to try to output the post’s title in
   the alt attribute of the image by calling the WP function the_title(). My plugin
   intercepts each call to the_title() and injects the markup of the marker if the
   post is unread. That normally works okay with standard WordPress themes.
 * One possible solution is to use the “Use JavaScript for showing markers” option,
   which was designed specifically for this kind of situation, but the problem here
   is that, as you said, it doesn’t work for you. We can try troubleshooting it.
   Try enabling it once again, and then Inspect the post’s title, where the “new”
   text is expected to appear, and show me what you find there. Also check if there
   are any JavaScript errors in the console.
 * Another option, which is worse, is altering the theme’s code and removing the
   alt attribute from the image. This solution is bad, though, because each time
   the theme gets auto-updated, this “fix” will get overwritten.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Mark New Posts] Title duplicate on image](https://wordpress.org/support/topic/title-duplicate-on-image/)
 *  Plugin Author [i.lychkov](https://wordpress.org/support/users/ilychkov/)
 * (@ilychkov)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/title-duplicate-on-image/#post-17402909)
 * Hi! What theme are you using? Please send a screenshot of how the markup looks
   for the glitched portion of the page (right-click on the duplicated title text,
   click “Inspect”).
    -  This reply was modified 2 years, 5 months ago by [i.lychkov](https://wordpress.org/support/users/ilychkov/).
 *   Forum: [Reviews](https://wordpress.org/support/forum/reviews/)
    In reply to:
   [[Mark New Posts] Can you do it for widget Recent Posts in sidebar?](https://wordpress.org/support/topic/can-you-do-it-for-widget-recent-posts-in-sidebar/)
 *  Plugin Author [i.lychkov](https://wordpress.org/support/users/ilychkov/)
 * (@ilychkov)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/can-you-do-it-for-widget-recent-posts-in-sidebar/#post-17141114)
 * Извиняюсь, упустил. Поправил!
 *   Forum: [Reviews](https://wordpress.org/support/forum/reviews/)
    In reply to:
   [[Mark New Posts] Can you do it for widget Recent Posts in sidebar?](https://wordpress.org/support/topic/can-you-do-it-for-widget-recent-posts-in-sidebar/)
 *  Plugin Author [i.lychkov](https://wordpress.org/support/users/ilychkov/)
 * (@ilychkov)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/can-you-do-it-for-widget-recent-posts-in-sidebar/#post-17109085)
 * I did some research and even [asked](https://wordpress.org/support/topic/modify-titles-only-for-posts-shown-in-the-recent-posts-widget/)
   on the support forum, and it seems it’s impossible to make the plugin work specifically
   in the Recent Posts widget or even just in the sidebar. So, as an alternative,
   I added an option to allow the plugin to work just anywhere outside of the post
   list. It just might work – please try the new version of the plugin.
 *   Forum: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
   
   In reply to: [Modify titles only for posts shown in the Recent Posts widget](https://wordpress.org/support/topic/modify-titles-only-for-posts-shown-in-the-recent-posts-widget/)
 *  Thread Starter [i.lychkov](https://wordpress.org/support/users/ilychkov/)
 * (@ilychkov)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/modify-titles-only-for-posts-shown-in-the-recent-posts-widget/#post-17108797)
 * Well, sorry to say, but the (a) option definitely is scary, and (b) doesn’t seem
   very elegant.
 * I thought of using the `the_widget` hook and setting a variable in my plugin 
   to `true` when the “Recent posts” widget starts to render – and then I would 
   just have to check the value of that variable in my code. But the problem is 
   that I see no way of setting that variable back to `false` once the widget is
   done rendering.
 *   Forum: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
   
   In reply to: [Modify titles only for posts shown in the Recent Posts widget](https://wordpress.org/support/topic/modify-titles-only-for-posts-shown-in-the-recent-posts-widget/)
 *  Thread Starter [i.lychkov](https://wordpress.org/support/users/ilychkov/)
 * (@ilychkov)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/modify-titles-only-for-posts-shown-in-the-recent-posts-widget/#post-17108689)
 * Oh, I’m the developer of the plugin, haha. And I’m just looking for a way to 
   implement that. And I mean the widget, yes.
 * Really, what I need is a function analogous to `in_the_loop()` that would instead
   detect whether a certain widget is being processed right now (or at least maybe
   just the sidebar in general).

Viewing 15 replies - 1 through 15 (of 87 total)

1 [2](https://wordpress.org/support/users/ilychkov/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/ilychkov/replies/page/3/?output_format=md)
[4](https://wordpress.org/support/users/ilychkov/replies/page/4/?output_format=md)
[5](https://wordpress.org/support/users/ilychkov/replies/page/5/?output_format=md)
[6](https://wordpress.org/support/users/ilychkov/replies/page/6/?output_format=md)
[→](https://wordpress.org/support/users/ilychkov/replies/page/2/?output_format=md)