• Euge

    (@gnbrndn)


    Hi, thanks for a great plugin.
    Been using this, but it appears that the shortcode only works in post/pages, I’m trying to use the shortcode for my plugin but it’s not rendering the table, it just print the shortcode itself. Thanks in advance for help. I’m a beginner in WP, so if I’m missing something please tell.

    https://www.ads-software.com/plugins/dbview/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author john ackers

    (@john-ackers)

    The table data is requested via ajax call and returned in a JSON format. Don’t know the answer but I’d check the browser error log and requests and responses e.g. by looking in the apache access log or perhaps using the browser debugger.

    Thread Starter Euge

    (@gnbrndn)

    Hi, thanks for the reply. That’s the reason, there’s no request coming out of the page. Thanks for help. Here is my code:

    <?php
    
    add_menu_page ( 'Recent Searches Page', 'Recent Searches', 'manage_options', 'recent-searches', 'recent_searches_init', '
    dashicons-search');
    
    function recent_searches_init() {
    ?>
    	<div class='wrap'>
    		<h1>Recent Searches</h1>
    		<?php do_shortcode("[dbview name='Search Log View' pagesize=10]"); ?>
    	</div>
    <?php
    }
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Shortcode for Admin Pages’ is closed to new replies.