Preventing Duplicating Posts from Widgets

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, ));

get_term_by with a variable

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

SFTP define in wp-config.php

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

PHP variables in a post?

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.

Loop info in jquery Tabs – loop into a variable?

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

Help me edit a variable with php

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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)