Tagged Questions
0
votes
1answer
54 views
How to include stylesheet in custom admin using parent_slug
Using this code from codex:
function my_enqueue($hook) {
if( 'edit.php' != $hook )
return;
wp_enqueue_script( 'my_custom_script', plugins_url('/myscript.js', __FILE__) );
}
add_action( ...
0
votes
1answer
121 views
Theme Options Menu Item - Permission Issue
I am trying to create a theme options menu item for my custom theme. However, when I add the following piece of code in the functions.php file...
add_menu_page('Page title', 'Asteria', ...
0
votes
1answer
518 views
SELECT field options disappear when saving widget
I'm having an interesting problem that I can't seem to solve.
While creating a widget, I have created a select field with options that can be chosen on the widget screen. It all works perfectly fine, ...
1
vote
3answers
240 views
Where should I update_options in a theme?
I am designing a theme where the home page (i.e. is_home()) should only display the latest blog post. I want to do something like $wp_query->update_option('posts_per_page', 1) every time I am on ...