Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Looking at the raw HTML of the theme. It will be easy enough to customize to your preference.

    Thread Starter bluntrizzle

    (@bluntrizzle)

    I’ve searched through the codex and found this example to add in an extra line for htaccess:-

    RewriteRule ^post/([0-9]+)?/?([0-9]+)?/?$ /index.php?p=$1&page=$2 [QSA]

    http://codex.ww.wp.xz.cn/Using_Permalinks#Long_Permalinks

    Could I possibly do something more similar where I would have it structured like this:-

    domain.com/%category%/%post_id%/%postname%/gallery/%image_name%/

    There doesn’t seem to be a setting for this in the WordPress admin so I’m guessing this will have to be either an easy hack replacing a certain line of code in the wp-includes folder or just adding another line in the htaccess.

    Hope you guys can help, thanks.

    Thread Starter bluntrizzle

    (@bluntrizzle)

    I know you can do this with the author name by editing the rewrite.php adjusting this piece of code:-

    var $author_base = 'author';

    Is this possible with the attachment name?

    Thread Starter bluntrizzle

    (@bluntrizzle)

    So after a bit of playing around and referencing I am using this code exmaple:-

    <?php
    			$currentauthor = the_author();
    			$my_query = new WP_Query('author_name=[currentauthor]&showposts=10');
      while ($my_query->have_posts()) : $my_query->the_post();
      $do_not_duplicate = $post->ID;?>
        <?php the_title(); ?>
      <?php endwhile; ?>
        <!-- Do other stuff... -->
      <?php if (have_posts()) : while (have_posts()) : the_post();
      if( $post->ID == $do_not_duplicate ) continue; update_post_caches($posts); ?>
       <!-- Do stuff... -->
      <?php endwhile; endif; ?>

    Is it possible for the author_name in wp_query to be the automatic author name of the page? I want it to be automatic so I don’t have to make an new page template for every single author and just change the author name in the wp query.

    Thanks in advance.

    Thread Starter bluntrizzle

    (@bluntrizzle)

    Awesome that worked after a little bit more of fiddling around [my fault due to lack of php knowledge I guess]

    In my sidebar-single.php I had to put this bit of code above the get_post_meta part:-

    <?php
    	global $post_id; ?>

    Thanks a lot guys, I am totally chuffed! Appreciate your help! =)

    Thread Starter bluntrizzle

    (@bluntrizzle)

    Thanks for the response. I’ve tried the above method and echo’d out the post id to see if it works for each single post but it does not.

    <?php
    	global $wp_query;
    	$post_id = $wp_query->post->ID;
    	echo $post_id;
    	?>

    It gets the post id from one post, which is not even the current post in the browser. If that makes any sense?

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