If ‘editor’ is empty, then

I’m using something of the sorts for delivering some standard default text if the post content is empty. Give this a whirl: <?php if( $post->post_content != “” ) { //do something or show content } else { //do something else }?>

static landing page leading to author specific pages w/ “live” content

As i see your code in header.php and index.php looking messy (because of many if conditions). If i’m understanding your problem then i do it like this create separate author.php for both authors their name like author-cait.php and author-shannons.php Give link like http://www.yousite.com/author/cait/ to button on static landing page.When user click on this,it takes him … Read more

Don’t show certain div on front page?

I think japanworm do not want it on the frontpage, the code above let’s it display only on the frontpage. You can exclude something (if not) by putting an ! before the tag. What you want to say is: If it isn’t front page than display the form So it would actually be <?php if( … Read more

Checking for ‘gallery’ shortcode using strpos always returns false

You will need global $post to get the $post variable into the scope of that function. function doraemon_scripts() { if( is_single() ) { global $post; if (strpos($post->post_content,'[gallery’) === false){ } else { // wp_enqueue_style( … ); // wp_enqueue_script( … ); } } } add_action( ‘wp_enqueue_scripts’, ‘doraemon_scripts’ ); Using the $post global outside of the Loop … Read more

Move Genesis Single Page/Single Post Title

Try this: add_action( ‘template_redirect’, ‘wpse_124609_remove_titles’ ); /** * Move or remove some post titles. */ function wpse_124609_remove_titles() { if ( is_front_page() ) { remove_action( ‘genesis_post_title’, ‘genesis_do_post_title’ ); } else if ( is_page() || is_single() ) { remove_action( ‘genesis_post_title’, ‘genesis_do_post_title’ ); add_action( ‘genesis_after_header’, ‘title_slider’ ); } } /** * Add Title Slider to some post titles. … Read more

do code if current url = value

global $wp; $current_url = add_query_arg( $wp->query_string, ”, home_url( $wp->request ) ); $is_specific_network = stripos( $current_url, ‘specific_domain_or_ip_address’ ); if( $is_specific_network !== false ) { // do the task below } else { // do something else or leave it blank } N.B. : You need to replace the IP address or specific domain name above to … Read more

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