Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

170
Vistas
Replace variable of Wordpress shortcode based on select box?

Is it possible to do this without Ajax, solely with vanilla JS and PHP?

What I am trying to do is:

  • Return the shortcode in PHP (easy)
  • Show it on the page (easy)
  • Allow users to select a text on the front-end (HTML is easy, but how do I send this as a variable?)
  • Change the shortcode variable with the chosen text on the front-end and load it dynamically on the page.

My question is: what options do I have? Is it solely Ajax or can I do this with PHP and JS-only?

function place_function() {
   
     return '[myshortcode place="new york"]';
}
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda