Single Page Design, Storing in Theme Options
Option values are longtext. So you can store up to 4,294,967,295 or 4GB (232 – 1) bytes in an option value. I wouldn’t do that … but feel free to test the edge cases. 🙂
Option values are longtext. So you can store up to 4,294,967,295 or 4GB (232 – 1) bytes in an option value. I wouldn’t do that … but feel free to test the edge cases. 🙂
Finally I found the solution myself.In case you are also having similar problem, add the following two lines global $wp_rewrite; $wp_rewrite->flush_rules();
How about something along these lines? function my_filter_where( $where=”” ) { global $post; $where .= ‘ AND post_date <= “‘.$post->post_date.'”‘; return $where; } add_filter( ‘posts_where’, ‘my_filter_where’ ); $query = new WP_Query( $query_string ); remove_filter( ‘posts_where’, ‘my_filter_where’ );
With CSS: If your theme uses post_class() on a containing element, you can target that element with the class .category-songs to control styling. With a template filter: add a filter to single_template and check the assigned categories for your songs category, and use the template songs-single.php if that category is found: function wpse_check_single_categories( $template=”” ){ … Read more
You need to rename loop-{custom-post-type}.php to single-{custom-post-type}.php. And to be explicit, the actual filename, based on your code above, should be: single-vfic_publications.php. Get rid of any other template redirects or anything else similar that you’re using. As per the Template Hierarchy, if you have a Custom Post Type named vfic_publications, and a template file named … Read more
You’ll have to prepare your own custom function instead of wp_link_pages to use in single.php file of your template. Here’s the custom function my_wp_link_pages proposal (contains original wp_link_pages code with commented out lines): function my_wp_link_pages($args=””) { $defaults = array( ‘before’ => ‘<p>’ . __(‘Pages:’), ‘after’ => ‘</p>’, ‘link_before’ => ”, ‘link_after’ => ”, /*’next_or_number’ => … Read more
Have you tried ‘current_category’ => 1, ? e.g.: $args = array ( ‘title_li’ => 0, ‘current_category’ => 1 ); wp_list_categories($args); There’s a chance it will still output all of them, but with a CSS class on the current categories, at which point you hide them all with CSS and unhide the ones with that class. … Read more
You can achieve this via the Rewrite API‘s add_rewrite_endpoint: function wpa89344_add_presentation_endpoint(){ add_rewrite_endpoint( ‘presentation’, EP_PERMALINK ); } add_action(‘init’, ‘wpa89344_add_presentation_endpoint’); Then in your template or wherever you differentiate a presentation vs normal view, check the global $wp_query for the presence of the presentation query var: global $wp_query; if( isset( $wp_query->query_vars[‘presentation’] ) ){ include(TEMPLATEPATH . “/single_wide_report.php”); } else … Read more
It depends on what theme you use as they are not coded the same. Use pre_get_posts or the reading settings and the_content() rather than the_excerpt() in your loop. function wpsites_home_page_limit( $query ) { if ( $query->is_home() && $query->is_main_query() && !is_admin() ) { $query->set( ‘posts_per_page’, ‘1’ ); } } add_action( ‘pre_get_posts’, ‘wpsites_home_page_limit’ ); Or you could … Read more
Disabling canonical redirect (crudely) gets the job done.