Thesis 2 custom Page
You can hook from the custom.php file inside /wp-content/thesis/skin/skin-name/ Or you can use this box http://www.rickbeckman.org/the-brazenly-coded-box-for-thesis-2-0/ to write PHP codes directly inside Thesis skin editor.
You can hook from the custom.php file inside /wp-content/thesis/skin/skin-name/ Or you can use this box http://www.rickbeckman.org/the-brazenly-coded-box-for-thesis-2-0/ to write PHP codes directly inside Thesis skin editor.
WordPress has inbuilt function force_balance_tags which I belive is not explored much but it can be useful in such scenario. get the content and truncate it to any arbitrary length $content = get_the_content(); $length = 1000; if(strlen($content) > $length) { $content = substr($content, 0, $length); } Now apply force_balance_tags function to balance any html tags … Read more
You have to hook in earlier, I would probably use template_redirect: add_action( ‘template_redirect’, ‘wpse_74577_redirect’ ); function wpse_74577_redirect() { // the code from your question }
function hide_from_search($qry) { if (is_search()) $qry->query_vars[‘post__not_in’][] = xXx; return $qry; } add_filter(‘pre_get_posts’,’hide_from_search’); The xXx is the ID number of the page to exclude. Just read it out of the URL on the backend. When you are editing the page you want to exclude look at the URL bar. You should see “post=xXx” in there.
If the contact page is identified solely by the associated template, you can query for a page with the template name in meta key _wp_page_template: $args = array( ‘post_type’ => ‘page’, ‘posts_per_page’ => 1, ‘meta_query’ => array( array( ‘key’ => ‘_wp_page_template’, ‘value’ => ‘contact_template.php’ ) ) ); $contact_page = new WP_Query( $args ); if( ! … Read more
If you go to All pages, and see up in the right courner you can see Screen Options. You can set how many pages you want to have per page. Then wordpress will give you all the pages on one page. Then you can use CTRL + F or Mac I think it is Cmd … Read more
The code you want is: <?php include ‘yourfile.php’ ?> Place the file in the same directory as header.php. EDIT: depending on the nature of the content, and how often you will reuse, you may also choose to use this: http://codex.wordpress.org/Function_Reference/get_template_part
<?php the_content(); ?> That’s the function that displays everything you saved in Pages – > Contact Page. You just need to move that anywhere you would like. Just keep in mind the_content() must be between the while loop for it to work. <?php if (have_posts()) : while (have_posts()) : the_post(); ?> // Begins loop <?php … Read more
You are calling get_page_by_title( $page_title ) already. Use it! if ( ! get_page_by_title( _x( ‘Homepage Template’, ‘home page title’, ‘your_theme_textdomain’ ) ) ) { // create the page } Do not delete user content on theme deactivation. The user might have put much energy into that page, and maybe he is not aware you delete … Read more
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