view images
-
Hi, I have created a shortcode to display on a page the results of a particular form, it shows everything well except the images that are only seen when I am logged in as administrator. What I lack? I attach the code that I have written in case you can help me.
regardsfunction decalogoE_shortcode( $atts, $content = null ) {
$formName = ‘miformulario’;
$fieldNameWithFile = ‘logo’;
$TipoEntidad = ‘tipo’;
$linea = “”;
// conectamos con el plugin CFDB para sacar los datos
require_once(ABSPATH . ‘wp-content/plugins/contact-form-7-to-database-extension/CF7DBPlugin.php’);
$plugin = new CF7DBPlugin();
require_once(ABSPATH . ‘wp-content/plugins/contact-form-7-to-database-extension/CFDBFormIterator.php’);
$exp = new CFDBFormIterator();
$exp->export($formName, array(‘show’ => ‘entidad,logo’, ‘search’ => $TipoEntidad));while ($row = $exp->nextRow()) {
// ponemos la url de la imagen de CFDB
$fileUrl = $plugin->getFileUrl($row[‘submit_time’], $formName, $fieldNameWithFile);
$linea .= “” . $row[‘entidad’] . “<br />”;
}
return $linea;
}
add_shortcode( ‘decalogoE’, ‘decalogoE_shortcode’ );
The topic ‘view images’ is closed to new replies.