How to decrease the max file upload size without using php.ini or htaccess?
At the top of your wp-config.php file: ini_set(‘upload_max_filesize’,’4M’);
At the top of your wp-config.php file: ini_set(‘upload_max_filesize’,’4M’);
ok, basicly. you need this logic <?php if (($a % 2) == 1) { echo “$a is odd.” ;} if (($a % 2) == 0) { echo “$a is even.” ;} ?> you’ll loop like you do. but indeed keep a counter. and check accordingly. I changed your code without testing. <?php function dt_attached($postid=0, $size=”thumbnail”, … Read more
According to the WordPress Codex on tag clouds, you need to specify a comma as the “separator” argument. $args = “separator”=>”,”; wp_tag_cloud($args);
Probably the easiest thing to do would be to fetch the fields above your table, and assign them to variables: $anime_anname = get_post_meta($post->ID, ‘anime_anname’, true); $anime_angenre = get_post_meta($post->ID, ‘anime_angenre’, true); … Then just wrap the table in an if statement that looks like the following: if ( !empty($anime_anname) || !empty($anime_angenre) || … ) { // … Read more
I don’t think it’s just occasionally, that will always get you the post meta of the first post on a search results page, a taxonomy page, an archive page – any page where there are multiple posts, because the $post global will always be populated with the first post of any main query result. EDIT- … Read more
If you have registered your option without setting the fourth parameter $autoload to no your calls to get_option will not trigger any extra database call because all aotoload options are stored in the cache when the site is loaded. To test it add … define( ‘WP_DEBUG’, TRUE ); define( ‘SAVEQUERIES’, TRUE ); … to your … Read more
What you need to look at is hooking into the user_contactmethods filter. Perhaps something along these lines: function test_new_contact(){ $user_contactmethods = array( ‘aim’ => __(‘AIM’), ‘yim’ => __(‘Yahoo IM’), ‘jabber’ => __(‘Jabber / Google Talk’), ‘twitter’ => __( ‘Enter Twitter ID’ ), ); return $user_contactmethods; } add_filter( ‘user_contactmethods’, ‘test_new_contact’ ); Note the “core” user contact … Read more
PHP is filtered out of the WordPress post editor as a security feature. There are some plugins that let you put them in, but I think they’re a pretty bad idea, so I won’t even link to them. If you need PHP on a page, you should be putting that code in a template file … Read more
To be able to query on your dates beyond a simple date comparison you should reverse the format of your date field. Dates should always follow the MySQL date format for reliable querying and sorting: YYYY-MM-DD HH:MM:SS To query movies for today you would use a meta query: $args = array( ‘posts_per_page’ => ‘-1’, ‘post_type’ … Read more
Is my global set up? As you can see from taking a look at the »Help«-panel, when you’re using my »Current Admin Screen Info« 1), there’re certain points/hooks/filters in code, that need to pass by before a global is set up. 1) Still searching for a better name. When to hook? Yesterday, while reading WPSE … Read more