Adz
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Duplicate Slugs for Posts in different categoriesBump.
Sorry, but I’m still looking for an answer.Forum: Themes and Templates
In reply to: posts_nav_link – Page Not FoundThank you Zeo. I initially left the
posts_per_page
in the query string which gave me an odd result – I could get to page 2, but not 3. Once I removed that, it worked perfectly. Thanks again.Forum: Themes and Templates
In reply to: posts_nav_link – Page Not Found@zeo – I have no idea what sort of filter you want me to create and what to do with it. Could you explain it please?
Forum: Themes and Templates
In reply to: posts_nav_link – Page Not Found@alchymyth – Thanks for the idea, but I’ve already tried that. It didn’t make a difference. Just for the sake of testing, I also tried navigating to
domainroot/2010/?paged=2
but still no luck.Forum: Plugins
In reply to: [Plugin: Custom Field Template] Removing <ul><li> tags@hiroaki Miyashita – Thank you!! It works beautifully!
Forum: Themes and Templates
In reply to: posts_nav_link – Page Not FoundIt’s decided to use the
index.php
template rather thanarchive.php
so for some reason, it’s not detecting that it’s an archive. I don’t think the problem is withposts_nav_link()
but I don’t have a clue what the problem is.Forum: Themes and Templates
In reply to: posts_nav_link – Page Not Foundarchive.php
<?php get_header(); ?> <div id="container"> <?php get_sidebar(); ?> <div id="rightcolumn" class="rightcolumn"> <?php query_posts($query_string . '&posts_per_page=2'); ?> <?php if ( have_posts() ) : ?> <?php while ( have_posts() ) : the_post(); ?> <div class="post" id="post-<?php echo $post->ID ?>"> <?php edit_post_link('[Edit]', '<div class="edit">', '</div>'); ?> <h3><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3> <span class="archiveCatName"> <?php foreach((get_the_category()) as $category) { echo(get_category_parents($category->cat_ID ,TRUE, ' ')); echo '<br />'; } ?> </span> <span class="newsDate"><?php the_time('l, F jS Y') ?></span> </div><!--End Post--> <?php endwhile; posts_nav_link(); else: ?> <h2>Page Not Found</h2> <p>Sorry, the page you were looking for could not be found.</p> <?php endif; ?> </div> <!--End Right Column--> <br /> </div> <!--End Container--> <?php get_footer(); ?>
I’m using it without any parameters at the moment until I can get it working properly.
Forum: Themes and Templates
In reply to: posts_nav_link – Page Not FoundSorry to bump my own thread, but anyone have any ideas?
Forum: Plugins
In reply to: [Plugin: Custom Field Template] Removing <ul><li> tags@mpez, this may be a stupid question, but did you add
singleList = true
to the template?Forum: Plugins
In reply to: [Plugin: Custom Field Template] Removing <ul><li> tags@elseudomini.net – I was thinking of doing that, but decided against it because I wasn’t too keen on the idea of removing functionality. But as you said, it works.
Forum: Themes and Templates
In reply to: Hide Comment Time & Datehttps://codex.www.ads-software.com/Template_Tags/wp_list_comments
You’ll have to create a callback function, as far as I can tell, unless there’s a simpler method.
There’s an example in the link above. If you want to keep everything else the same as the default, just remove or comment out the part that says:
<?php printf(__('%1$s at %2$s'), get_comment_date(), get_comment_time()) ?>
Simpler method: if your theme uses a class name for the date/time, you can use CSS to just hide it. For example, if the markup is:
<span class="commentDateTime">15 April 2010 at 01:23</span>
You can add this to your CSS:
.commentDateTime { display:none }
Forum: Plugins
In reply to: [Plugin: Custom Field Template] Removing <ul><li> tagsOkay, it stores the values in arrays, which is why it lists the output rather than just a string.
So, I tried a rough hack to create a new option called stripTags and put:if ( $val['stripTags'] == true ) : $replace_val = trim(strip_tags($replace_val)); endif;
after
if ( $val['singleList'] == true ) : $replace_val = '<ul><li>' . $replace_val . '</li></ul>'; endif;
in
custom-field-template.php
but that didn’t do anything.So I just added
$output = trim(strip_tags($output));
before the return in:
if ( $metakey ) : $metavalue = $this->get_post_meta($post_id, $key, $single); if ( is_array($metavalue) ) : $output = '<ul>' . "\n"; foreach ( $metavalue as $val ) : $output .= '<li>' . $val . '</li>' . "\n"; endforeach; $output .= '</ul>' . "\n"; else : $output = $metavalue; endif; $output = trim(strip_tags($output)); return $output; endif;
I know there’s a simpler way without changing the code, because I’ve done it before. I just can’t figure it out :s
Forum: Fixing WordPress
In reply to: Trying to output a post’s terms (taxonomy) as text, not URLsI was trying to output all of the terms from a taxonomy and ended up with something like this. I made a few changes to suit your situation. Though I haven’t tried it, I’d hope it works.
<?php //Your code: $terms = get_the_terms($post->ID, 'cuisine_type'); print_r($terms); //my code foreach ($terms as $taxindex => $taxitem) { if ($taxindex=='name') { ?> <span><?php echo $taxitem; ?></span> <? } //end if } // end foreach ?>
In theory, your code would give you the array you posted earlier. Then my code would loop through the array and for each index that matches ‘name’ (which is where “Mexican” would be stored) will echo the value.
Hope that helps.
Forum: Installing WordPress
In reply to: Cannot access widgets – permissions error after upgrade to 2.8.3Hi,
I’m not entirely certain about this, but I had a somewhat similar issue with accessing a theme options pages.The widget is in the widgets.php file, right? Open it up and look for a header redirect. I don’t recall the code by memory, but it’ll be something like
header('location:http:/:....')
It’ll probably end inthemes.php
. Change that towidgets.php
and hopefully it will start working.Hope that helps.
Forum: Fixing WordPress
In reply to: Trying to output a post’s terms (taxonomy) as text, not URLsTry this:
<?php echo $terms['name']; ?>
That specifies exactly which index you want from the array.