charvan
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Using Custom Field To Show 5 Posts of CategoryDon’t understand why this does not work:
<?php global $wp_query; $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $art_cat = (get_post_meta($post->ID, 'art_cat', true)); query_posts(array('posts_per_page' => '10','paged'=>$paged,'category_name'=>$art_cat)); ?>
Forum: Fixing WordPress
In reply to: Plugin for a footer navigation menuThanks. This helped me, but a couple improvements:
<ul class="navmenu"> <li><?php wp_list_pages( 'title_li=' ); ?></li> </ul>
Doesn’t need the surrounding
<li></li>
as it creates an empty<li></li>
– the PHP call creates the list item for you.Should look like this instead:
<ul class="navmenu"> <?php wp_list_pages( 'title_li=' ); ?> </ul>
Also, that table craziness in your CSS is prolly not necessary. Try this instead for simplified version:
ul.navmenu {margin:10px 0;overflow:hidden;} ul.navmenu li {padding:0 30px 0 34px;list-style-type:none;display:inline;} ul.navmenu li a,#footernav a:active,#footernav a:visited{color:#<strong>COLOR OF CHOICE</strong>;text-decoration:none;} ul.navmenu li a:hover{text-decoration:underline;}
Forum: Fixing WordPress
In reply to: nextgen gallery loses functionalityHonza108, trying your fix to this problem but without success. Thanks!
Forum: Plugins
In reply to: [Plugin: NextGEN Gallery] tinymce integration doesn′t workAdding gallery to post via visual editor loads in custom WP 404 error page. Think I need an .htaccess fix because permalinks are on, but not sure how.
Forum: Themes and Templates
In reply to: “Static” Home Plus Content From “Edit Page” CMSHave this working, but trying to understand why and also if it will stand up to use.
<!--Loop--> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <?php global $post; $myposts = get_posts('numberposts=5&category=1'); foreach($myposts as $post) : ?> <div <?php post_class() ?> id="post-<?php the_ID(); ?>"><h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2></div> <?php endforeach; ?> <?php endwhile; ?> <?php endif; ?> <!--Loop--> <!--MiniLoop (actual new query without loop?)--> <?php global $post; $myposts = get_posts('numberposts=1&category=1'); foreach($myposts as $post) : ?> <?php the_content(); ?> <?php endforeach; ?> <!--MiniLoop (actual new query without loop?)-->
What I cannot seem to grok is how both of these are referring to the global list of posts and getting different results –
- Loop pulling the first 5 entries from the “blog” page
- “MiniLoop” pulling from the text I have entered via the CMS from the page being called and used as Home NOT from post entries
Additionally for MiniLoop:
- – if “numberposts” is anything but “1” it pulls the text form the CMS entry page the same number of times (repeats it over and over)
- – “Pages” don’t have “Categories”, why is “category=1” grabbing the copy as explained above?