WordPress.org

Ready to get started?Download WordPress

Forums

Search Unleashed
Search unleashed doesn't spider custom plugins (3 posts)

  1. sailorarie
    Member
    Posted 3 years ago #

    Hi,

    I installed search unleashed, and now it spiders successfully some thrid party plugins I have installed.

    On the other hand I does not find anything in some simple plugins i wrote myself.

    If i make a plugin like:

    <?php
    /*
    Plugin Name: Hello world
    Plugin URI:
    Version: 1.0
    Author: Sailorarie
    Description: say Hello world
    */
    
    function showContent($content = '') {
    
    	?>
    	<p>Hello World</p>
    
    	<?php
    }
    
    add_shortcode('helloworld', 'showContent');

    And call it with a shortcode:

    [helloworld]

    It won't find the string 'hello'

    Has anyone an Idea ?

  2. teebes
    Member
    Posted 3 years ago #

    Try making sure your function showContent is 'returning' the output instead of just echoing it out. That might help as your text will then be in the correct location of the page output.

    ie:

    function showContent($content = '') {
    
      $output .= '<p>Hello World</p>';
      return $output;
    }

    Good luck!

  3. sailorarie
    Member
    Posted 3 years ago #

    Thanks teebes, that solved the problem !

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic