WordPress is a very simple system with which we can create a website in minutes. We only need a little knowledge of PHP, SQL and a server on which to host the files.
When it comes to it we add ads to the articles pages of a website created with WordPress, the task is pretty easy. On most of themes WordPress (WP Themes), the article page is given by the file single.php or happy.php, usually located in the root of the theme. Your ad or ads will be placed wherever we want. Before content, by content, by title, etc.
Once the code was added HTML or Java of an ad, itwill automatically be visible in all articles pages on the website / blog. The problem occurs when we want to exclude ads from certain pages of the websiteacquis.
If we do not want advertisements to appear in a particular article, we have to take a few simple steps but need a little attention.
How to exclude ads / ads from certain pages of a blog or website made with WordPress
First of all we need one accession fTP or any other access path to us allow access si editing WordPress theme files where we have or are going to have the ads.
Let's assume the ads will be in single.php, a shared file of all articles on the website.
We edit the single.php file and add the code:
if (! is_single($Post))
"$ Post" will be replaced with the article ID number in which you do not want to display "COD ADS". You identify it very easily in the browser's address bar when editing the article. "? Post =19067
Save the single.php file and the ads will not be present on the page with the article you specified. If you have to add more pages in which you want the ads not to be present, add the comma IDs to each other.ads Remove "Save to Pocket" in Firefox Quantum »»
Old: «« macOS High Sierra 10.13.1 - New Emoji & Bug Fixes
IT Tips - Windows, Mac OS X, Linux & Mobile - How do we exclude an ad or item from a particular "Post" in WordPress