tjalling474
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Posts listing on starting letter (alphabetical)yeah, you’re right ??
the letters were being displayed twice,
that’s why edited de code to:
echo '<a name="' . $curr_letter . '"></a>';
that way it works fine.thanks for all the help! ??
Forum: Fixing WordPress
In reply to: Posts listing on starting letter (alphabetical)Thanks! It’s working now ??
Forum: Fixing WordPress
In reply to: Posts listing on starting letter (alphabetical)Okay, well I it is finally up and running.
The only thing left is to add the anchors.
So these:<a name="A">A</a>
How should I insert this in the code:<?php $posts = (get_query_var('posts')) ? get_query_var('posts') : 1; $args = array ( 'posts_per_page' => $posts_per_page, 'post_type' => 'post', 'orderby' => 'title', 'order' => 'ASC', 'post' => $post ); query_posts($args); if ( have_posts() ) { $in_this_row = 0; while ( have_posts() ) { the_post(); $first_letter = strtoupper(substr(apply_filters('the_title',$post->post_title),0,1)); if ($first_letter != $curr_letter) { if (++$post_count > 1) { end_prev_letter(); } start_new_letter($first_letter); $curr_letter = $first_letter; } if (++$in_this_row > $posts_per_row) { end_prev_row(); start_new_row(); ++$in_this_row; // Account for this first post } ?> <div class="title-cell"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></div> <?php } end_prev_letter(); ?>
I really appreciate the help. ??
Forum: Fixing WordPress
In reply to: Posts listing on starting letter (alphabetical)Hey, I made a custom page template, put the code in it and edited so it follows my theme’s structure. If also put the functions in my functions.php. But when I want to view a page which uses this template I get the following error:
Parse error: syntax error, unexpected T_VARIABLE, expecting ‘)’ in /home/animesum/public_html/wp-content/themes/arras/A-Z Pagestest.php on line 39On line 39 there is this:
$in_this_row = 0;
There is a function that Ive put in my functions.php:function start_new_row() { global $in_this_row; $in_this_row = 0; echo "\t<div class='row-cells'>\n"; }
So I don’t understand why I got the error. 0_o
Forum: Fixing WordPress
In reply to: Posts listing on starting letter (alphabetical)Thanks for the reply, looks like I can use that ??
But were should I put that code..?Forum: Fixing WordPress
In reply to: How to show tags IN a post?It works =D
Forum: Fixing WordPress
In reply to: How to show tags IN a post?I used the first shortcode that you gave me:
function tags_in_post($atts) { // [tags] outputs post's tags in a span global $post; $tags = '<span class="post-tags">'; ob_start(); the_tags( '<span class="post-tags"><strong>Tags:</strong> ', ', ', '</span>' ); $tags = ob_get_flush(); return $tags; } add_shortcode ('tags', 'tags_in_post');
and I deleted the Tags: in this part
the_tags( '<span class="post-tags"><strong>Tags:</strong> ', ', ',
otherwise you get Genres: Tags: ….There is only a problem now. The tags do not only show after Genres: but also at the beginning of my post like this:
Test
(EDIT POST)
POSTED IN: ANIME SUMMARIES
Action, Comedy <<<<<<<<<
InformationGenres: Action, Comedy
Rating: (No Ratings Yet)Does anyone know a solution?
Forum: Fixing WordPress
In reply to: How to show tags IN a post?Thanks a lot. It works perfect now! =D
Forum: Fixing WordPress
In reply to: How to show tags IN a post?Thanks a lot ??
That will do the trick. But in which file should I put:function tags_in_post($atts) { // [tags] outputs post's tags in a span global $post; $tags = '<span class="post-tags">'; ob_start(); the_tags( '<span class="post-tags"><strong>Tags:</strong> ', ', ', '</span>' ); $tags = ob_get_flush(); return $tags; } add_shortcode ('tags', 'tags_in_post');
or
function dtags_func($atts) { extract(shortcode_atts(array( 'before' => '', 'separator' => ', ', 'after' => '', ), $atts)); the_tags($before,$separator,$after); } add_shortcode('dtags', 'dtags_func');
In single.php?
Forum: Plugins
In reply to: [Five Star Rating] [Plugin: Five Star Rating] Short codesThanks, It works now ??
Can I also put a small image next to the results?