Create a Javascript Code that removes a column of a table in wordpress

En cours Publié le il y a 2 ans Paiement à la livraison
En cours Paiement à la livraison

I have a WordPress website that uses the WP Ninja Tables Pro Plugin to show tables. Every table has a header (left column) and one other column with content (see link example: [login to view URL]).

Now I inserted a snippet that shows Ads into one column which is called "Anzeige". However, the header of the column (green part) needs to disappear, so that the Ad content is bigger (especially on mobile).

The final result should look like the screenshots 1 and 2 that I added.

I already had a developer that created this code that I inserted before <body>:

<script>

function removeAnzeigeColumns(){

let all_ths = [login to view URL]('th');

let anzeige_ths = [];

[login to view URL]('Running function Anzeige ..')

for(let i = 0; i < [login to view URL]; i++){

try{

if(all_ths[i].textContent == 'Anzeige' || all_ths[i].textContent == 'Anzeige 1' || all_ths[i].textContent == 'Anzeige 2'){

[login to view URL](all_ths[i]);

}

} catch(err) {

}

}

for(let i = 0; i < [login to view URL]; i++){

let th_sibling = anzeige_ths[i].nextElementSibling;

try{

[login to view URL]('colspan', '2');

anzeige_ths[i].[login to view URL](anzeige_ths[i]);

} catch (e){

}

}

}

[login to view URL]('DOMContentLoaded', function(e){

setTimeout(function(){

removeAnzeigeColumns()

let table_links = [login to view URL]('.footable-page-link');

for(let i = 0; i < [login to view URL]; i++){

table_links[i].addEventListener('click', function(){

setTimeout(function(){removeAnzeigeColumns()},2000)

});

}

let selects = [login to view URL]('select');

for(let i = 0; i < [login to view URL]; i++){

selects[i].addEventListener('change', function(){

setTimeout(function(){removeAnzeigeColumns()},4000);

});

}

},3300);

});

</script>

However, with this code the column only disappears in the beginning when the page loads but when I use the filtering function on top or the pagination of the table, everything is messed up.

Unfortunately I cannot share access to the wordpress site so you need to solve the problem with "inspect element" and send me the code which I can then implement and you can test it.

Either you fix the code from the previous developer (see above) or you create a new one.

WordPress JavaScript PHP CSS HTML

Nº du projet : #29965317

À propos du projet

16 propositions Projet à distance Actif il y a 2 ans

16 freelances font une offre moyenne de 122 € pour ce travail

caciocode

Hi, I am a Wordpress & JavaScript developer. I can create JavaScript code to remove the green part next to the ad.

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% EUR en 1 jour
(304 Commentaires)
6.9
alihassan321

Hi, I am full stack developer having 8+ yrs experience. I have reviewed description of your project. I can do this job, I can provide you code to add it on server. I can start work now. Thanks

€100 EUR en 2 jours
(57 Commentaires)
6.0
d1master

Hi there. I am an experienced expert in PHP/WordPRess I am certainly confident I can perfectly meet your requirements. If you hire me, you will be happy with excellent work, high quality, and a short period. My budget Plus

€150 EUR en 2 jours
(25 Commentaires)
5.8
DeveloperKatya

Hi, Hope you are doing well! Thanks for sharing your project requirement with me. As a highly skilled Full-Stack developer, I can help you perfectly. I am very confident with my skills and I'd like to help your busines Plus

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% EUR en 1 jour
(7 Commentaires)
4.9
vladilavsuhovoy1

Hi, How are you? I am really interested in your project, " Create a Javascript Code that removes a column of a table in wordpress". I’m an experienced developer in Wordpress. I have rich experiences in PHP, JavaScri Plus

€150 EUR en 5 jours
(17 Commentaires)
4.8
ognjenstev00

Hi, I'm a jQuery and WordPress expert and FULL Time Developer. I have checked your requirements carefully. I have rich experience in WordPress, PHP, Website design, CSS, Javascript, etc. I can start work immediate Plus

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% EUR en 1 jour
(2 Commentaires)
3.0
ahmedrazaidrees9

Hi, Hope you are doing well, I just read your description that you are looking for a WordPress Developer. I am a Full Stack Developer, meaning that i have already worked on different projects. Contact me for more info Plus

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% EUR en 1 jour
(0 Commentaires)
0.0