Working with post values in the admin panel

I solved it this way <form name=”input” action=”<?php echo get_bloginfo( ‘template_directory’ ).”https://wordpress.stackexchange.com/”.’post_options_from_form.php’; ?>” method=”post”> although i wanted post_options_from_form.php to be an admin page. Edit: This finally worked as i was able to post to the admin page i created <form name=”input” action=”admin.php?page=admin_page” method=”post”> On the function, function admin_page() { require(‘post_options_from_form.php’); }

Use external fonts in WordPress stylesheet

Just a suggestion: Learn from another plugin Take a look at this plugins code to find out how it integrates Google Fonts http://wordpress.org/extend/plugins/wp-google-fonts/screenshots/ Learn by example create your own Theme Panel a. Here’s a wp-tut http://net.tutsplus.com/tutorials/wordpress/how-to-create-a-better-wordpress-options-panel/ b. (from comments below) The easiest approach is to just output the user’s CSS into the page template … … Read more

WP_Query do not include posts with a certain value in a custom field –

Try adding the type parameter: $args = array(‘post__not_in’ => $exclude, ‘ignore_sticky_posts’ => 1, ‘posts_per_page’ => 5, ‘meta_query’=> array( array( ‘key’=>’my_featured_post’, ‘value’=> 1, ‘type’ => ‘numeric’, // assuming your custom_value is an int, not a string. ‘compare’=>’!=’ ) ) ); $query = new WP_Query($args);

Give a function a unique ID

Just… call the function again – you only need to include it once! include ‘./path/to/lib.php’; echo_tweet_js(); // a little tweeting here … echo_tweet_js(); // and a little tweeting over here!

Hiding an added admin page menu using css

WordPress already takes care of that for you. The third argument in your add_menu_page function, which reads edit_themes is the capability required to access the page. If the user doesn’t have that capability he can’t access the page, so WordPress won’t show him that option on the menu. Clever, no? Now, from the code you … Read more

Updates for a private plugin?

Since WordPress v5.8, it is a lot simpler to create yourself a basic version of custom plugin update functionality. Step 1 Create JSON file on your server. It will contain info about latest version number of your plugin(s) and link to ZIP file(s) for WordPress to automatically download it when update is triggered. Example location: … Read more