Categories
CMS Mastering Development Wordpress

Replace word in “the_content” only for index.php

I have some posts with video tag that contains autoplay (they should autoplay when you access the post page). I am using the the_content to show these videos on index page. The problem is that when you access the home page, all the videos start playing. I have used the following function to remove it: […]

Categories
CMS Mastering Development Wordpress

How can I modify all existing tags while keeping the urls themselves?

I want to modify all current links to Amazon on my site, to add a rel="nofollower" tag — they currently have an existing rel="noopener" tag which, as I thought, was always placed at the beginning: <a rel="noopener" href="https://amzn.to/example">text</a> I went into functions.php and added the following: // add nofollow to Amazon function add_noFollow($text) { $text […]