Lo shortcode del plugin Wordpress non funziona
-
-
Iltuo codicefunzionaperme su WP 3.9.2,siain unplugin chein functions.php.Gli altri codicibrevifunzionanobene?Your code works for me on WP 3.9.2, either in a plugin or functions.php. Do other shortcodes work OK?
- 0
- 2014-09-05
- Gabriel
-
Confermo anche che questo shortcodefunzionabene.Qualcosa ha rimossoilfiltro `do_shortcode` dall'hook`the_content`?Prova apassare a untemapredefinito (iltuotema utilizza "the_content ()"?) E disabilitatuttii plugin.Quindi abilitali 1per 1pertrovareilpotenziale conflitto.I also confirm that this shortcode works ok. Has something removed the `do_shortcode` filter from the `the_content` hook? Try switching to a default theme (is your theme using `the_content()`?) and disabling all plugins. Then enable them 1 by 1 to find the potential conflict.
- 1
- 2014-09-06
- helgatheviking
-
3 risposta
- voti
-
- 2014-09-08
Grazieper letue risposte.Dopo ulterioriindagini,ho scoperto cheilfile delpluginin cuiera stato definitoilmio shortcode veniva visualizzato come "inattivo".Dopo aver spostato lemie definizioni di shortcodein unfile attivo,tutto hainiziato afunzionare.Spero che questo sia utileper chiunque siimbattain questoin futuro.
Grazie ancora!
Thanks for your responses. After further investigation, I found that the plugin file where my shortcode was defined was showing up as "inactive". Once I moved my shortcode definitions into an active file, then everything began to work. I hope this is useful for anybody who runs into this in the future.
Thanks again!
-
Accetta la risposta correttainvece dellatua.Please accept the correct answer instead of your own.
- 0
- 2018-05-15
- Chess Byte
-
- 2014-09-07
Ci sono unpaio di cose da controllare qui
-
Uno:iltuoplugin è attivato.
-
Due: èiltuo shortcodenelfile delpluginprincipale. Se quel codice èin un altrofile all'interno deltuoplugin,ti sei assicurato diincludere quelfileextraneltuofilepluginprincipale
-
Tre:non hainessuntipo dierrorenelfile deltuoplugin che disattivailtuoplugin dopo l'attivazione. Haiimpostatoil debug sutrue. Uno deimembri del sito ha uneccellenteplug-in di debug disponibileperil download su wordpress.org chiamato Debug Objects
-
Quattro:prova a spostareiltuo shortcodenelfunctions.php deltuotemaper assicurarti cheiltuo shortcodefunzionieffettivamente. Senonfunziona all'interno deltuotema,ilproblemapotrebbeessereeffettivamenteneltuotema stesso
-
Cinque: come suggerito da @helgatheviking,non staifiltrando
the_content()
in alcunmodo chepotrebbe causare questo comportamento -
Sei: setutto quanto sopranon riesce,disattivatuttii plugin,passa a untemain bundlee ricontrolla. Seilproblemapersiste,aggiorna/reinstalla Wordpress,poichépotrebbetrattarsi di unfile core danneggiato
There are a couple of things to check here
One: Is your plugin activated.
Two: Is your shortcode in your main plugin file. If that code is in another file inside your plugin, did you make sure to include that extra file into your main plugin file
Three: Don't you have any type of error in your plugin file that deactivates your plugin after activation. Have you set debug to true. One of the site's members have an excellent debugging plugin available for download on wordpress.org called Debug Objects
Four: Try moving your shortcode to your theme's functions.php to make sure that your shortcode is actually working. If it doesn't work inside your theme, the problem might actually be in your theme itself
Five: As suggested by @helgatheviking, aren't you filtering the
the_content()
in any way that might cause this behaviorSix: If all of the above fails, deactivate all plugins, switch to a bundled theme, and recheck. If the problem persist, upgrade/reinstall Wordpress, as this might be a corrupted core file then
-
Hofatto la lista di controllo: 1=controlla !,2=si !,3=no,4=ok,5=no,6-> hafunzionato! Dopo aver cambiatoilmio wp locale (peri test) da "Sydney Theme" a "Twenty Fourteen",vienemostrato SC.Sembra che ci sianotemi cheimpediscono la visualizzazione di SCnei post.I did the checklist: 1=check!, 2=yes!, 3=nope, 4=ok, 5=nope, 6-> worked! After switching my local wp (for testing) from 'Sydney Theme' to 'Twenty Fourteen' the SC gets shown. Seems that there are themes which prevent SCs from showing in posts.
- 0
- 2017-03-13
- Martin Pfeffer
-
Grazie Pieterper questa lista di controllo.È venutofuori chenon avevoincluso correttamenteilmiofile ... woops.Funzionabene ora :)Thanks Pieter for this checklist. Turns out I hadn't included my file correctly ... woops. Works fine now :)
- 0
- 2018-05-15
- Chess Byte
-
Hofattotutto quanto seguee ancoranonfunziona.Ho unanuovainstallazione di WordPress (5.0.2) con codice aggiunto alfilefunctions.php.Ma quandometto [shortcodename]in unapagina vienetrattato cometesto.Che c'è?Usoiltemapredefinito: Twenty Sixteen.I did all the following and still it does not work. I have new WordPress (5.0.2) install with code added to functions.php file. But when i put [shortcodename] in a page it is treated as text. What is wrong? I use default theme: Twenty Sixteen.
- 0
- 2019-01-04
- hal
-
Questa è una lista di controllo super utile.L'unica cosa che aggiungerei sarebbe un Seven: assicurati cheiltuoeditor dipaginanon stia collegandoiltuo shortcode comeilmioera: [plc_get_matter_detail_per_contact contacts=6c131-
668f13139ematter=6c620185-6211-1331-a642-668f6b7eea9e] Quell'utile WordBreakmi haincasinatoper unpo '.Grazieeditor dipagine ... This is a super helpful checklist. The only thing I'd add would be a Seven: make sure your page editor isn't jacking up your shortcode like mine was: [plc_get_matter_detail_per_contact contacts=6c131-668f13139e matters=6c620185-6211-1331-a642-668f6b7eea9e] That 'helpful' WordBreak screwed me up for a while. Thanks page editor... - 0
- 2019-11-08
- Brian Stinar
-
-
Perché?Cosafa questo?Dove lo aggiungerebbero?Perfavore [modifica] (https://wordpress.stackexchange.com/posts/317290/edit) latua risposta usandoil link [modifica] (https://wordpress.stackexchange.com/posts/317290/edit) soprae aggiungimaggioriinformazioni su come questo aiuta a risolvereilproblema.Why? What does this do? Where would they add this? Please [edit](https://wordpress.stackexchange.com/posts/317290/edit) your answer using the [edit](https://wordpress.stackexchange.com/posts/317290/edit) link above and add in more information on how this helps solve the problem.
- 1
- 2018-10-22
- Howdy_McGee
-
Ho uno shortcode definitoin unplugin come segue:
Ora all'interno di unapagina wordpress sto cercando di accedere alplugin come segue:
Tuttavia,lo shortcodenon vieneeseguitoe l'output è solo "[tag1]".Puoi aiutare?
Grazieperiltuo aiuto.