Autoloading a PHP class – working outside, but not inside WordPress plugin
Autoloading a PHP class – working outside, but not inside WordPress plugin
Autoloading a PHP class – working outside, but not inside WordPress plugin
Manipulate database of WordPress site with my own scripts
I’m not sure how much of a help this will be, but this is a (probably overly convoluted) snippet of code I wrote a few years ago for a shortcode to display posts by category. If nothing else it may at least put you on the right track. $featured_posts = get_posts( array( ‘category’ => $atts[‘cat’], … Read more
PHP version or config prohibiting script from working properly
Using ‘array’ method in wp_nav_menu causes it to disappear
$wpdb->get_results in not an array
anybody that looking for solution here is what i found that work for me. to get some data from any field in profile page you need to use this function: <?php get_the_author_meta( $field, $userID ); ?> then if you want to update some value in theme customizer you can use this function: set_theme_mod( ‘field name’, … Read more
How to resize an image server-side before upload?
As you’re using a VPS with SSH access, give WP-CLI a try http://wp-cli.org/ can work wonderfully http://centminmod.com/nginx_configure_wordpress_ffpc_plugin.html#installwp for example to install limit login attempts plugin just run this command from SSH within your wordpress install directory wp plugin install limit-login-attempts –activate –allow-root full list of command line options at http://wp-cli.org/commands/ updating plugins http://wp-cli.org/commands/plugin/ & http://wp-cli.org/commands/plugin/update/ … Read more
get_the_content(); must be used in the loop for it to work as specified in the Codex. To get post content in your case you have to use $recent[“post_content”] instead.