• I am really new to writing plugins, but I am busy writing a plugin and it works fine, except it appears in every page. I am using the ‘the_content’ hook. Is there a way of only producing the output depending on the page slug?

Viewing 1 replies (of 1 total)
  • Thread Starter taz72

    (@taz72)

    I also just noticed it replicates itself in every post… this is what my plugin looks like:

    <?php
    /*
    Plugin Name: wp-realtor
    Plugin URI: https://www.estateagencies.co.za/
    Description: This is the plugin to display the listings you have uploaded to estateagencies.co.za.
    Author: Darren Morrisby
    Version: 1.0
    Author URI: https://www.bizability.co.za/
    */

    // This section calls the estateagencies API
    include(“estateagencies_api.php”);

    function show_my_listings() {

    show_listings(“For Sale”, “1”, “130”, “100”, “130”, “100”);

    }

    add_action(‘the_content’, ‘show_my_listings’);

    ?>

Viewing 1 replies (of 1 total)
  • The topic ‘Plugin appearing in every page’ is closed to new replies.