• Hello and a very good morning!

    I have a free template, called flamingo and I have a question about it.
    I don’t know if it is a template issue or just a me not understanding issue..

    The template is shown here:
    https://newwpthemes.com/wordpress-theme/flamingo/

    What I want is actually quite simple (I think), I want a menu on top where it also is in the demo. But I want each menu item to link to a static page, so not to a blog post page. Because I want to use static pages for most of the website.
    However, I do not know if this is possible.
    The only way items show up in this menu bar, is when I create a category under “posts” but that is not what I want, I want category’s, yes, but to connect them to static pages.

    Anybody has an idea how to solve?

Viewing 6 replies - 1 through 6 (of 6 total)
  • You want to list pages? Read over this function, and add to the theme. Presumably the theme is using wp_list_categories to automatically produce the menu. Replace that with wp_list_pages and you should be sorted.

    Thread Starter yodibashi

    (@yodibashi)

    Great, I think it works now…thanks for your help!

    Thread Starter yodibashi

    (@yodibashi)

    Hi SpankMarvin,

    One more question. What you told me works..but now my featured posts slider dous not work anymore.
    How can I help that?
    When I look in featured.php (which I think I should look) I see this below..can I replace all category with pages or is it more difficult?

    <?php
    if(get_theme_option(‘featured_posts’) != ”) {
    ?>
    <script type=”text/javascript”>
    function startGallery() {
    var myGallery = new gallery($(‘myGallery’), {
    timed: true,
    delay: 6000,
    slideInfoZoneOpacity: 0.8,
    slideInfoZoneSlide: false,
    showCarousel: false
    });
    }
    window.addEvent(‘domready’, startGallery);
    </script>
    <div class=”fullbox_excerpt”>
    <div class=”fullbox_content”>
    <div class=”smooth_gallery”>
    <div id=”myGallery”>

    <?php
    $featured_posts_category = get_theme_option(‘featured_posts_category’);

    if($featured_posts_category != ” && $featured_posts_category != ‘0’) {
    global $post;

    $featured_posts = get_posts(“numberposts=5&&category=$featured_posts_category”);
    $i = 0;
    foreach($featured_posts as $post) {
    setup_postdata($post);
    if ( version_compare( $wp_version, ‘2.9’, ‘>=’ ) ) {
    $slide_image_full = get_the_post_thumbnail($post->ID,’large’, array(‘class’ => ‘full’));
    $slide_image_thumbnail = get_the_post_thumbnail($post->ID,’large’, array(‘class’ => ‘thumbnail’));
    } else {
    $get_slide_image = get_post_meta($post->ID, ‘featured’, true);
    $slide_image_full = “<img src=\”$get_slide_image\” class=\”full\” alt=\”\” />”;
    $slide_image_thumbnail = “<img src=\”$get_slide_image\” class=\”thumbnail\” alt=\”\” />”;
    }

    ?>
    <div class=”imageElement”>
    <h3><?php the_title(); ?></h3>
    <?php the_excerpt(); ?>
    ” title=”<?php the_title(); ?>” class=”open”>
    <?php echo $slide_image_full; ?>
    <?php echo $slide_image_thumbnail; ?>
    </div>
    <?php }
    } else {
    for($i = 1; $i <=5; $i++) {
    ?>
    <div class=”imageElement”>
    <h3>This is featured post <?php echo $i; ?> title</h3>
    <p>To set your featured posts, please go to your theme options page in wp-admin. You can also disable featured posts slideshow if you don’t wish to display them.</p>
    ” class=”open”>
    <img src=”<?php bloginfo(‘template_directory’); ?>/jdgallery/slides/<?php echo $i; ?>.jpg” class=”full” alt=”” />
    <img src=”<?php bloginfo(‘template_directory’); ?>/jdgallery/slides/<?php echo $i; ?>.jpg” class=”thumbnail” alt=”” />
    </div>
    <?php
    }
    }

    ?>
    </div>
    </div>
    </div>
    </div>
    <?php } ?>

    This line:

    $featured_posts = get_posts(“numberposts=5&&category=$featured_posts_category”);

    Has 2 ampersands when it should only have one…?

    Thread Starter yodibashi

    (@yodibashi)

    mmm don’t know, I didn’t changed anything to this page yet…
    but that’s not the solution I think for my problem?
    Thanks for your help…

    You might also try changing $post to another variable name in the foreach loop, as it might be interfering with the global $post variable.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Static pages connect to menu bar, but how?’ is closed to new replies.