Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)
  • Another option is to use the include and exclude parameters. You can specify which tags to use, or to leave out, for each cloud.

    You mentioned this. How do we include them into the <?php wp_cumulus_insert(); ?>

    or

    do we just do it in <?php wp_tag_cloud(); ?>

    and how do we do this?

    Thread Starter yahyaayob

    (@yahyaayob)

    Okay. I’m thinking like this.

    We can use <?php wp_cumulus_insert(); ?>, right?

    Can I show just the TAGS only and if I can, how do I code it into the above?

    Is it:

    <?php wp_cumulus_insert('mode=tags'); ?>

    Thread Starter yahyaayob

    (@yahyaayob)

    Okay. I read this information at https://codex.www.ads-software.com/Template_Tags/wp_tag_cloud.

    I’m not sure now that is it possible to do an include or exclude categories or tags using WP-Cumulus.

    hmmm…is there no way? I’m kinda going nuts…haha..

    Thread Starter yahyaayob

    (@yahyaayob)

    Hey roytanck, how do we put the parameters in wp-cumulus to exclude some categories and tags?

    is it as below:

    <?php wp_cumulus_insert(‘exclude=9,11,7’); ?>

    Awaiting your response bro. =D

    Thread Starter yahyaayob

    (@yahyaayob)

    Different sidebar? Hmmm, that can work I think.

    I was thinking earlier that I would create a page template with a different sidebar (not widget) so that means I would be using your template tags and the parameters to exclude and include certain categories.

    So then I edit that special page and use the above template page and it should do it, right?

    I hope you get what I’m trying to say. =)

    Thread Starter yahyaayob

    (@yahyaayob)

    The pagination still did not work. I click on page 2 and the page shows me page 1 still.

    Thread Starter yahyaayob

    (@yahyaayob)

    Thanks alchymyth!

    I have done what you suggested and still not working.

    <div id="main-content">
    
    <div id="englishsostop">
    <div id="submit-a-photo"><a href="https://www.singanista.com/demosite/raise-english-s-o-s-photo-submission/"><h2>SUBMIT A PHOTO!</h2></a></div>
    </div>
    
    <?php
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    ?>
    
    <?php query_posts("cat=10&orderby=date&order=ASC&paged='.$paged'"); ?>
    
    <?php if (have_posts()) : ?>
    
    <?php while (have_posts()) : the_post(); ?>
    
    <?php $customFieldName = get_post_meta($post->ID, 'Name', true); ?>
    
    <div id="votebox"><?php if(function_exists('the_ratings')) { the_ratings(); } ?></div>
    
    <div <?php post_class() ?> id="post-<?php the_ID(); ?>">
    
    <div id="post-height-engsos"><div class="alignleft"><?php the_post_thumbnail('index-post-thumbnail'); ?></div>
    
    <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> by <?php echo $customFieldName; ?>
    
    <p class="cat-tag">CATEGORIES: <?php the_category(', ') ?> | <?php the_tags('TAGGED: ', ', ', ''); ?> | <?php the_time('F jS, Y') ?> | <?php edit_post_link('Edit', '', ' | '); ?>  <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?> <!-- by <?php the_author() ?> --></p>
    
    <div class="more-link"><?php the_content('<br />(READ MORE...)'); ?></div>
    
    </div>
    
    </div>
    
    <?php endwhile; ?>
    
    <?php if (next_posts_link() || previous_posts_link()): ?>
    
    <?php next_posts_link('&laquo; Older Entries') ?> | <?php previous_posts_link('Newer Entries &raquo;') ?>
    
    <?php endif ?>
    
    <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>
    
    <?php else : ?>
    
    <h2>Not Found</h2>
    <p>Sorry, but you are looking for something that isn't here.</p>
    
    <?php get_search_form(); ?>
    
    <?php endif; ?>
    
    </div>

    Any other ideas?

    Thread Starter yahyaayob

    (@yahyaayob)

    Thanks alchymyth.

    It didn’t work.

    <?php query_posts("cat=10orderby=date&order=ASC&paged='.$paged'"); ?>

    And I click on page 2 but it’s still on page 1.

    Forum: Themes and Templates
    In reply to: Post on Pages

    I got an error.
    Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home2/singanis/public_html/demosite/wp-content/themes/starkers/english_sos_page.php on line 56

    Please help. My code below:

    .......
    
    <?php
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("paged=$paged");
    ?>
    
    <?php global $more; $more = 0; ?>
    
    <?php global $wp_query;
    query_posts(
    		array_merge(
    				array(
    						'cat' => 10,
    						'posts_per_page' => 3,
    						'order' => 'ASC',
    						'orderby' => 'post_title'
    				),
    				$wp_query->query
    		)
    );
    ?>
    
    <?php if (have_posts()) : ?>
    
    <?php while (have_posts()) : the_post(); ?>
    
    <?php $customFieldName = get_post_meta($post->ID, 'Name', true); ?>
    
    	<div id="votebox"><?php if(function_exists('the_ratings')) { the_ratings(); } ?></div>
    
    <div <?php post_class() ?> id="post-<?php the_ID(); ?>">
    
    <div id="post-height-engsos"><div class="alignleft"><?php the_post_thumbnail('index-post-thumbnail'); ?></div>
    
    			<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> by <?php echo $customFieldName; ?>
    
    <p class="cat-tag">CATEGORIES: <?php the_category(', ') ?> | <?php the_tags('TAGGED: ', ', ', ''); ?> | <?php the_time('F jS, Y') ?> | <?php edit_post_link('Edit', '', ' | '); ?>  <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?> <!-- by <?php the_author() ?> --></p>
    
    <div class="more-link"><?php the_content('<br />(READ MORE...)'); ?></div>
    
    </div>
    </div>
    	<?php endwhile; ?>
    
            <?php if (next_posts_link() || previous_posts_link()): ?>
    		<?php next_posts_link('&laquo; Older Entries') ?> | <?php previous_posts_link('Newer Entries &raquo;') ?>
    
            <?php endif ?>
    <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>
    
    <?php else : ?>
    
    	<h2>Not Found</h2>
    	<p>Sorry, but you are looking for something that isn't here.</p>
    	<?php get_search_form(); ?>
    
    <?php endif; ?>
    
    ......

    Which part did I do wrong?

    Thread Starter yahyaayob

    (@yahyaayob)

    Thanks esmi! Yes i know that using wp_list_pages can generate the results I expect with the current highlighting.

    But using image is very challenging and I have found the answer after hours and hours of trying and trying.

    Below is my menu using hardcoding. Notice the the addition of conditional tags to is_page() which are is_page_template() and is_categories().

    <ul id="pagenav">
    
    <li<?php
                    if (is_home())
                    { echo ' class="current"'; }?>><a href="<?php bloginfo('url'); ?>/"><img src="<?php bloginfo('url'); ?>/wp-content/uploads/headquarters.png" /></a></li>
    
    <li<?php
                    if (is_page('log-book') || is_page_template('log_book_page.php') || is_category('12'))
                    { echo ' class="current_logbook"'; }?>><a href="<?php bloginfo('url'); ?>/log-book/"><img src="<?php bloginfo('url'); ?>/wp-content/uploads/logbook.png" /></a></li>
    
    <li<?php
                    if (is_page('grammar-guru') || is_page_template('ask_johnny_page.php') || is_category('17'))
                    { echo ' class="current_grammarguru"'; }?>><a href="<?php bloginfo('url'); ?>/grammar-guru/"><img src="<?php bloginfo('url'); ?>/wp-content/uploads/grammarguru.png" /></a></li>
    
    <li<?php
                    if (is_page('english-s-o-s') || is_page_template('english_sos_page.php') || is_category('10'))
                    { echo ' class="current_englishsos"'; }?>><a href="<?php bloginfo('url'); ?>/english-s-o-s/"><img src="<?php bloginfo('url'); ?>/wp-content/uploads/englishsos.png" /></a></li>
    
    <li<?php
                    if (is_page('once-upon-a-time') || is_page_template('once_uponatime_page.php') || is_category('11'))
                    { echo ' class="current_onceuponatime"'; }?>><a href="<?php bloginfo('url'); ?>/once-upon-a-time/"><img src="<?php bloginfo('url'); ?>/wp-content/uploads/onceuponatime.png" /></a></li>
    
    <li><a target="_blank" href="https://www.britishcouncil.org/malaysia.htm"><img src="<?php bloginfo('url'); ?>/wp-content/uploads/thebritishcouncil.png" /></a></li>
    
    </ul>

    by using the || the page recognize all the conditions and will highlight the current page. Just inserting the is_page() conditional tag is not enough.

    Then the challenge for me is that each menu is of different length and I could not use simply background-color to be used for all menus.

    So I use PS to paint each menu the color for highlight and then save it as a different name but easy to identify like filename_c.png.

    Then I used different classes for each menu so that whenever the current page pass through all conditions, then the selected page class will be used for highlighting the current page.

    I hope I have not confuse anyone. Anyway below is my CSS.

    .current {
    background:url('https://singanista.com/demosite/wp-content/uploads/headquarters_c.png') no-repeat top left;
    }
    .current_logbook {
    background:url('https://singanista.com/demosite/wp-content/uploads/logbook_c.png') no-repeat top left;
    }
    .current_grammarguru {
    background:url('https://singanista.com/demosite/wp-content/uploads/grammarguru_c.png') no-repeat top left;
    }
    .current_englishsos {
    background:url('https://singanista.com/demosite/wp-content/uploads/englishsos_c.png') no-repeat top left;
    }
    .current_onceuponatime {
    background:url('https://singanista.com/demosite/wp-content/uploads/onceuponatime_c.png') no-repeat top left;
    }

    Phew! Job done! Time for me to zzz…

Viewing 10 replies - 1 through 10 (of 10 total)