samcrawshaw
Forum Replies Created
-
Forum: Hacks
In reply to: paginate comments linksNever mind, solved it with wp_list_comments.
Forum: Hacks
In reply to: basic if statementResolved
Forum: Hacks
In reply to: basic if statementHi bcworkz,
I meant the url reads //localhost/mysite/contact but it’s not pulling in the page.
The source code looks like this when outputted:
<li id="menu-item-127" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-127"><a href="http://localhost/mysite/projects/">Projects</a></li> <li id="menu-item-130" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-130"><a href="http://localhost/mysite/contact/">Contact</a></li> EDIT: Well shiver mi timbers, once I reactivated the plugins it started working again!? Thanks for your help bcworkz. Regards, SamThe back end also throws out a 404 when I click on View Page permalink.
I’ve tried deactivating all my plugins but still no joy.
EDIT: Well, shiver-mi-timbers. Once i reactivated the plugins it started working again.
Thanx for your help bcworkz.
Regards,
SamForum: Hacks
In reply to: Only display featured image of the first postSomething like this?
<?php $recent = new WP_Query("showposts=7"); while($recent->have_posts()) : $recent->the_post(); $counter++;?> <ul> <?php if($counter == 1){ the_post_thumbnail();}?> <li><h3><?php the_title(); ?></h3></li> <li><?php the_excerpt();?></li> <?php if($counter > 1){?> <li><h3><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h3></li> }?> <?php endwhile; ?> </ul>Can’t check it at the moment, might have errors.
Sorry, your on your own with the CSS.
Forum: Hacks
In reply to: Display same menu for parent and all its childrenNot sure if I get you, but something akin to this?
if (is_page('your_page_name')){ wp_nav_menu(array('menu' => 'your_menu_name', 'container' => false, 'items_wrap' => '<ul id="%1$s" class="%2$s"><h4>Menu Name</h4>%3$s</ul>'));} else if{arguments for another menu} else if{arguments for another menu} else{what to do otherwise}Forum: Plugins
In reply to: Tag decription on hoverFathomed it:
<p>Tags: <?php $posttags = get_the_tags(); if ($posttags) { foreach($posttags as $tag) { echo '<a href="';echo bloginfo(url); echo '/?tag=' . $tag->slug . '" class="' . $tag->slug . '" title="' . $tag->description . '">' . $tag->name; echo '</a> '; } } ?> </p>Forum: Plugins
In reply to: [Plugin: Formidable] Creating custom shortcodesDid it with JavaScript in the end:
[Code moderated as per the Forum Rules. Please use the pastebin]
Don’t know if this is relevant now but you would need to create a shortcode in your function.php file.
Forum: Plugins
In reply to: Pagination using wp_paginate or wp_pagenavi in custom pageRookie mistake. Wasn’t using $paged.
<?php if (is_page('22')){ $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("posts_per_page=4&cat=7&paged=$paged"); if ( have_posts() ) : while ( have_posts() ) : the_post();?> <div class="posts"> content... </div><!--end posts--> <?php endwhile; else: endif; if(function_exists('wp_paginate')){ wp_paginate();} wp_reset_query();}?>Have you added
<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>in your footer.php file? (or where ever it is desired)