• Imagehbee

    (@heatherbodlak)


    Hello

    I installed the plugin, and added a PHP script, selecting “short code (Manual)” from the dropdown for Placement Method. but when I save the snipped, it reverts to “Automatic”, and no shortcode is generated (when i go to the snipped listing, the column “Snippet Placement” has nothing.

    this is the code I have pasted:

    <?php
    require_once("conexion.php");
    require("paginacion.php");
    ?>
    <?php
    $sql= "SELECT * FROM decesos";
    $res=mysql_query($sql,$con);
    $total = mysql_num_rows($res);
    $pg = $_GET['page'];
    $cantidad = 8;
    $paginacion = new paginacion($cantidad, $pg);
    $desde = $paginacion->getFrom();
    $sql1= "SELECT * FROM decesos LIMIT $desde,8";
    $res1=mysql_query($sql1,$con);
    $url = "despedidas.php?";
    $classCss = "numPages";
    $back = "&laquo;Atras";
    $next = "Siguiente&raquo;";
    $paginacion->generaPaginacion($total, $back, $next, $url, $classCss);


    while($row = mysql_fetch_array($res1))
    {
    ?>
    <tr height="80">
    <td>
    <p align="center" style="margin-bottom: -8px;"><img src="http://www.tanatoriossanantonio.com/wp-content/uploads/2014/06/cruz.jpg"; height="100"; width="75" /></p>
    <h3 align="center" style="color:#900"><?php echo $row["nombre"];?></h3>
    <h5 align="center">
    <?php
    echo $row["fallecimiento"];
    echo '<br />';
    echo $row["confortado"];
    echo "<br />";
    echo $row["entierro"];
    echo "<br />";
    echo $row["tanatorio"];
    echo ", sala nª:";
    echo $row["sala"];
    ?>
    <div id="veresquela" align="right">
    <a href="http://www.tanatoriossanantonio.com/esq?id=<?php echo $row["id"];?>" style="text-decoration:none; color:#999">
    Ver esquela
    </a>
    </div>
    <div id="enviopesame" align="left">
    <a href="http://www.tanatoriossanantonio.com/envie-su-pesame/" style="text-decoration:none; color:#999">
    Envíe su pésame
    </a>
    <img style="margin-top:-10px; margin-bottom: 10px;" src="http://www.tanatoriossanantonio.com/wp-content/uploads/2014/06/sep-falecidos.jpg" />
    <p />
    </div>
    <?php
    }
    ?>
    </h5>
    </td>
    </tr>
    </table>
    <?php
    $url = "despedidas.php?";
    $classCss = "numPages";
    $back = "&laquo;Atras";
    $next = "Siguiente&raquo;";
    $paginacion->generaPaginacion($total, $back, $next, $url, $classCss);
    ?>

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello @heatherbodlak ,

    Sorry for the late response.

    Sometimes the “Placement Method” may not persist due to a minor database or cache issue. A simple deactivate and reactivate of the plugin can often resolve this and allow the shortcode to be generated correctly.

    Also, we noticed that your snippet uses deprecated mysql_* functions (mysql_query, mysql_num_rows, etc.), which can trigger warnings or prevent execution on PHP 7+ sites. Updating these to mysqli_* or PDO functions is recommended to ensure compatibility with modern PHP versions.

    Once these points are addressed, your snippet should save with “Shortcode (Manual)” and generate a shortcode that you can use in your pages/posts.

    Thread Starter Imagehbee

    (@heatherbodlak)

    Thank you for your reply. I need to see if i am able to edit that PHP code (i’m not a programmer!)

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.