How to add a new variable to blog creation form?
The WordPress Setting API should provide everything you need, it even automatically stores values IIRC. As buddypress is built on top of WordPress I assume this work for buddypress as well.
The WordPress Setting API should provide everything you need, it even automatically stores values IIRC. As buddypress is built on top of WordPress I assume this work for buddypress as well.
You should use post__not_in parameter (see Post & Page Parameters in Codex). Since it takes an array you will also need to switch to array rather than string for passing arguments. Something like this: query_posts(array( ‘showposts’ => 1, ‘cat’ => get_catId( $instance[‘catOption4’] ), ‘post__not_in’ => $themename_do_not_duplicate, ));
Like usual. 🙂 Works most of the time unless it ends up in some place that is not echoed to the screen by browser. echo $email_to; And for debug it is more informational to use var_dump(). Personally I usually use this to quickly add/remove dump to filter: add_filter(‘filter’,’dump_filter’,10, 1); // 1, or how many arguments … Read more
you can look at line 874 in /wp-includes/taxonomy.php for the function itself. the value has stripslashes applied and then it’s used in a prepared statement, so I’d say it’s safe. but there’s nothing stopping you from checking the value yourself first if you know what parameters it will always fall within, like ctype_alnum or something. … Read more
You are looking for get_query_var() function: $orderby = get_query_var(‘orderby’);
Do you mean SFTP or FTPS? For SFTP you need to enable libssh2-php on your server and link it to your PHP and restart your ssh, you can get the downloads here http://www.libssh2.org/ Once you install that you should automatically see SFTP/SSH option in your admin under “Connection”, though I believe there was some recent … Read more
Functions – yes. Class methods – no (but prefix the class name). Variables – inside your functions/methods – no (like in your example); inside template files – yes, because there are lots of global variables exposed by WP in them, and you might get conflicts…
By default, PHP is stripped out of the posts content. You can use this plugin to aleivate this: http://wordpress.org/extend/plugins/exec-php/ This will give you a quick, easy fix to be able to do it the way you are trying to. I would suggest reading http://codex.wordpress.org/Custom_Fields for the more proper way to do this though.
You would have to perform the query for each respective tab. If you are using WP_Query then you can perform the query and then use $found_posts to return the total number of posts matching that query. For instance, $query_tab_1 = new WP_Query($args); //Where $args is some arguments for your query $tab_1_count = $query_tab_1->found_posts; The $query_tab_1 … Read more
How about defining a custom page template? If you put /* Template Name: Two Column */ as the first line of your PHP and put the template with the other templates (page.php, home.php, index.php, etc) in your theme, then on the page creation screen there will be an option to select template which you can … Read more