Am I not understanding plugins?

when faced something similar I found a solution that works if your framework resides inside a plugin (so it seems). If your main plugin file (one that is recognized by WordPress as the plugin file) is in, e.g. /plugin/Aisis/ you can put this path in a constant, eg. define(‘AISISPATH’, dirname(__FILE__)); require ( trailingslashit (AISISPATH) . … Read more

nowplaying.include.php Will Not Display Results

Your script is at /wp-content/themes/responsive-child-theme/nowplaying-example.php but you are including /nowplaying-example.php. That is not going to work. You need to provide the complete path for that include: include(get_stylesheet_directory().’/nowplaying-example.php’); Assuming I have read that right, and assuming that the files are actually there. Your other code– the widget code– contains curly quotes. Don’t use those. Use ordinary, … Read more

How to get Poster (thumbnail) Image of Video

Your video does not appear to be “attached” to the page, hence the 0 as post_parent. And your query arguments do not restrict the results to any particular page. You won’t be able to use the normal thumbnail functions. You will have to use something like wp_get_attachment_image to get the thumbnail, if you have a … Read more

How do i get (unique) page name?

The WP global variable $pagename should be available for you, I have just tried with the same setup you specified. $pagename is defined in the file wp-includes/theme.php, inside the function get_page_template(), which is of course called before your page theme files are parsed, so it is available at any point inside your templates for pages. … Read more

Warning: array_pop() expects parameter 1 to be array, boolean given

get_the_terms() will return a boolean false under some circumstances: A post with no terms assigned gives a false result, not an empty array. https://codex.wordpress.org/Function_Reference/get_the_terms#Returns It sounds like that is what is happening. You need to check that $post_link = to ensure that it is the type you expect before trying to use it.

allow user to select pages from dropdown in my plugin

Change your code to this register_setting( ‘rex_plug_options’, ‘rex_plug_options’, ‘rex_plug_settings_validate’ ); add_settings_field(‘rex_plugbox_text_exit_pop_selected_pages’, ‘Select Pages’, ‘rex_plugbox_text_exit_pop_selected_pages’, ‘rex_plug_box’, ‘rex_plug_main_box’); //with selectbox you cannot select multiple pages. If you need that try checkbox function rex_plugbox_text_exit_pop_selected_pages(){ global $rex_plug_options; if(!isset($rex_plug_options[“rex_plugbox_text_exit_pop_selected_pages”])) { $rex_plug_options[“rex_plugbox_text_exit_pop_selected_pages”] = “”; } ?> <select id=”rex_plugbox_text_exit_pop_selected_pages” name=”rex_plug_options[rex_plugbox_text_exit_pop_selected_pages]”> <?php if( $pages = get_pages() ){ foreach( $pages as $page ){ echo … Read more