Getting a specific “title for a section” only on Startpage?

I think perhaps what you want is either <?php if ( !is_front_page() ) : ?> <h2> <?php wp_reset_query(); ?> <?php echo $post->post_type; ?> </h2> <?php endif; ?> if you’ve done a custom front page that shows the blog posts, or <?php if ( !is_home() ) : ?> <h2> <?php wp_reset_query(); echo $post->post_type; ?> </h2> <?php … Read more

get_the_term_list give me a whitespace

I wonder if you got any term_links-genre filters that could be modifying your get_the_term_list() output? Your code example should in general work as expected, but you might want to use the get_the_terms() function to better control the output to your own likings. Here’s a modifed version of the corresponding Codex example: /** * Customized the … Read more

how to goto specific page number including title with permalink

You’re using the wrong index: $GLOBALS[‘create_page_service’] = ‘1281’; # Your code uses ‘create_page_finder’ below $out .= ‘<a href=”‘.get_page_link($GLOBALS[‘create_page_finder’]).'”>’.get_the_title($GLOBALS[‘create_page_finder’]).'</a>’; $GLOBALS[‘create_page_service’] = ‘1281’; # my changed code uses ‘create_page_service’ below $out .= ‘<a href=”‘.get_page_link($GLOBALS[‘create_page_service’]).'”>’.get_the_title($GLOBALS[‘create_page_service’]).'</a>’; As an aside, I would avoid using globals whenever you can.

Exclude Everywhere but Admin Area?

Note that there’s no is_admin() method for the WP_Query class. But the interesting part is that PHP will not complain about this: $query->is_admin() where $query is an instance of WP_Query. It will just always return false. This is the reason why (#src): /** * Make private/protected methods readable for backwards compatibility. * * @since 4.0.0 … Read more