Forum Replies Created
- Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Notice: Trying to get property 'comment_author_email' of non-object in /var/html/dev/wp/wp-content/plugins/fv-gravatar-cache/fv-gravatar-cache.php on line 236
clirving
ParticipantWarning: Cannot modify header information - headers already sent by (output started at /var/html/dev/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php:340) in /var/html/dev/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_wp.class.php on line 220Ignore the added \ as they seem to get inserted in spaces of the code
AdvertismentDeprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Notice: Trying to get property 'comment_author_email' of non-object in /var/html/dev/wp/wp-content/plugins/fv-gravatar-cache/fv-gravatar-cache.php on line 236clirving
ParticipantWarning: Cannot modify header information - headers already sent by (output started at /var/html/dev/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php:340) in /var/html/dev/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_wp.class.php on line 220So here is the code all mashed together by a project manager and artists who does not to php or wordpress and it works! Thanks all:
//Commented out this next line of code original to minimatica theme
//<?php query_posts( $args ); ?>
//Added following code from forum – Link: http://dev.onedesigns.com/support/topic.php?id=389&page=2
<?php
if ( is_home() ) {
query_posts( array (
‘category_name’ => ‘featured’,
‘posts_per_page’ => -1,
‘paged’ => $paged ) );
}?>Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Notice: Trying to get property 'comment_author_email' of non-object in /var/html/dev/wp/wp-content/plugins/fv-gravatar-cache/fv-gravatar-cache.php on line 236clirving
ParticipantWarning: Cannot modify header information - headers already sent by (output started at /var/html/dev/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php:340) in /var/html/dev/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_wp.class.php on line 220Here is the code that I have. All is good except I am not sure where to add Daniel’s
‘paged’ => get_query_var( ‘paged’ ) to query_posts? Any feedback is fantastic and appreciated.<?php
/**
* The Loop when viewing in gallery mode
*
* @package WordPress
* @subpackage Minimatica
* @since Minimatica 1.0
*/
?>
<?php
global $wp_query, $query_string;
$paged = get_query_var( ‘paged’ );
$args = array(
‘posts_per_page’ => 4,
‘paged’ => $paged,
‘ignore_sticky_posts’ => 1
);
$args = wp_parse_args( $args, $wp_query->query );
?>
//Commented out this next line of code
//<?php query_posts( $args ); ?>
//Added following code from forum – Link: http://dev.onedesigns.com/support/topic.php?id=389&page=2
<?php
if ( is_home() ) {
query_posts( array ( ‘category_name’ => ‘featured’, ‘posts_per_page’ => -1 ) );
}?>
<?php if( have_posts() ) : ?>
<div id=”ajax-content”>
<ul id=”slides” class=”kwicks”>
<?php while( have_posts() ) : the_post(); ?>
<?php $thumbnail = null; ?>
<?php if( has_post_thumbnail() ) : ?>
<?php $thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id(), ‘slider-thumb’ ); ?>
<?php endif; ?>
<li class=”slide”>
<div id=”post-<?php the_ID(); ?>” <?php post_class(); ?><?php if( isset( $thumbnail ) ) : ?> style=”background:url(<?php echo $thumbnail[0]; ?>) center no-repeat”<?php endif; ?>>
<div class=”opacity”></div>
” rel=”bookmark”>
<div class=”entry-container”>
<h2 class=”entry-title”>” title=”<?php the_title_attribute(); ?>” rel=”bookmark”><?php the_title(); ?></h2>
<div class=”entry-summary”>
<?php the_excerpt(); ?>
<div class=”clear”></div>
</div><!– .entry-summary –>
</div><!– .entry-container –>
</div><!– .post –><?php $thumbnaill = null; ?>
<?php endwhile; ?>
<!– #slides –>
<div class=”clear”></div>
<?php if ( $wp_query->max_num_pages > 1 ) : ?>
<div id=”nav-slider”>
<div class=”nav-previous”><?php next_posts_link( ” ); ?></div>
<div class=”nav-next”><?php previous_posts_link( ” ); ?></div>
</div><!– #nav-above –>
<?php endif; ?>
<?php rewind_posts(); ?>
</div><!– #ajax-content –>
<?php endif; ?>
<?php wp_reset_query(); ?>Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Notice: Trying to get property 'comment_author_email' of non-object in /var/html/dev/wp/wp-content/plugins/fv-gravatar-cache/fv-gravatar-cache.php on line 236clirving
ParticipantWarning: Cannot modify header information - headers already sent by (output started at /var/html/dev/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php:340) in /var/html/dev/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_wp.class.php on line 220Instead of writing new code I strongly suggest using associated-posts-pro or the free version.
[url=http://wpplugins.com/plugin/247/associated-posts-pro/?view=installation]associated-posts-pro[/url]
it is amazing and works very nicely with posting posts to pages, posts to posts, pages to pages etc.
We are currently updating the code in minimatica to remove the “show only” 4 items from blog pages as we want to see more than four associated posts.
Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Deprecated: Function get_magic_quotes_gpc() is deprecated in /var/html/dev/wp/wp-includes/formatting.php on line 4371Notice: Trying to get property 'comment_author_email' of non-object in /var/html/dev/wp/wp-content/plugins/fv-gravatar-cache/fv-gravatar-cache.php on line 236clirving
ParticipantWarning: Cannot modify header information - headers already sent by (output started at /var/html/dev/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php:340) in /var/html/dev/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_wp.class.php on line 220Just to be clear and confirm:
Go into the loop-slider.php
Replace:
<?php query_posts( $args ); ?>
with:
<?php
if ( is_home() ) {
query_posts( array ( \’category_name\’ => \’featured\’, \’posts_per_page\’ => -1 ) );
}?>and place:
\’paged\’ => get_query_var( \’paged\’ )
WHERE?
When I replaced the first line the menu and slider and other details disappeared. Any feedback is greatly appreciated as I can’t wait to share our fire art images and info with all of Toronto Canada