Forum Replies Created

Viewing 15 replies - 1 through 15 (of 15 total)
  • Forum: Fixing WordPress
    In reply to: pages not found
    Thread Starter gf

    (@gf)

    thats fixed that, but to get it working with perma links i need to sort htaccess?

    Forum: Fixing WordPress
    In reply to: pages not found
    Thread Starter gf

    (@gf)

    hi

    WordPress is installed on our dedicated server. If you dont use this theme it still doesn’t work.

    to get to the admin panel i go to: https://dev.iceni-tv.co.uk/dsa/wp-login.php

    doesn’t work even if i use a default theme.

    Below is the navigation code.

    <!-- Main Menu -->
        <div id="menu">
            <ul>
                <?php
                // Get array of pages and output with CSS classes to allow for image replacements
                $pages = get_pages('sort_column=menu_order&parent=0');
                foreach ($pages as $key=>$page) {
                    ?>
                    <li>
                        <a href="<?php echo $page->guid; ?>" title="<?php echo $page->post_title; ?>"
                        class="<?php echo $page->post_name; ?><?php echo (($urlParts[0] == $page->post_name OR ($urlParts[0] == '' AND $page->post_name == 'home')) ? ' selected' : ''); ?>">
                            <?php echo $page->post_title; ?>
                        </a>
                    </li>
                    <?php
                }
                ?>
            </ul>
        </div>
    Forum: Fixing WordPress
    In reply to: pages not found
    Thread Starter gf

    (@gf)

    thanks but reading through that i dont think thats the issue.

    if anything is:
    dsa/home
    dsa/contact

    it fails.

    Thread Starter gf

    (@gf)

    always knew it was going to be a simple solution. Just went brain dead. Thanks

    try the flutter plugin, it allows on the fly editing.

    Thread Starter gf

    (@gf)

    all seems to be working fine, if i start to have problems i’ll look at alternatives.

    Thanks for your help

    Thread Starter gf

    (@gf)

    yeah, i’m running is in another loop.

    but i have shortened it and its not doing anything strange to the parent.

    <?php
     $polly_current_author = get_the_author_meta('ID'); // assign the variable as current category
     ?>
           <?php
    
           $recent = new WP_Query('author=' .$polly_current_author. '&cat=3'); while($recent->have_posts()) : $recent->the_post();?>

    Thread Starter gf

    (@gf)

    this has sorted it

    <?php
     $polly_current_author = get_the_author_meta('ID'); // assign the variable as current category
     $query= 'author=' .$polly_current_author. '&cat=3'; // concatenate the query
     query_posts($query); // run the query
     echo $polly_current_author; // check data is been passed
     ?>

    I needed get_the_author_meta.

    Not sure why its working for me though i’m getting the author ID, honest.

    thanks

    Thread Starter gf

    (@gf)

    <?php
    if(get_query_var('author_name')) :
        $curauth = get_userdatabylogin(get_query_var('author_name'));
    else :
        $curauth = get_userdata(get_query_var('author'));
    endif;
    ?>
    
        <div>
      Latest News
    
    		 <?php
     $query= 'author=' . $curauth->ID. '&cat=3'; // concatenate the query
     query_posts($query); // run the query
     ?>

    more like this even. I’m not displaying this data with the author temple page.

    Thread Starter gf

    (@gf)

    so

    <?php
    if(get_query_var('author_name')) :
        $curauth = get_userdatabylogin(get_query_var('author_name'));
    else :
        $curauth = get_userdata(get_query_var('author'));
    endif;
    ?>
    
        <div>
      Latest News
    
    		 <?php
     $polly_current_author = $curauth->ID;// assign the variable as current category
     $query= 'author=' .$polly_current_author. '&cat=3'; // concatenate the query
     query_posts($query); // run the query
     echo $polly_current_author; // check data is been passed
     ?>
    
     <ul>
    <?php
    
          if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    
            <li>
                <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>">
                <?php the_title(); ?></a>
            </li>
    
             <?php endwhile; else: ?>
    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    <?php endif; ?>
    
    <!-- End Loop -->
    
        </ul>
        </div>
    Thread Starter gf

    (@gf)

    redid it to this.

    It is definitely echoing the correct author ID its just not passing it into the query.

    <?php
     $polly_current_author = the_author_meta('ID'); // assign the variable as current category
     $query= 'author=' .$polly_current_author. '&cat=3'; // concatenate the query
     query_posts($query); // run the query
     echo $polly_current_author; // check data is been passed
     ?>
    Thread Starter gf

    (@gf)

    no doesn’t seem to want to work, very frustrating.

    Thread Starter gf

    (@gf)

    Its not limiting the list of post from cat 3 to just a specific author.

    This is been used on a profile page for each author, so i would like to show only there latest news post and not other authors post on the profile page.

    Thread Starter gf

    (@gf)

    thanks for the reply, first one i’ve had from 3 posts.

    Doesn’t the_author_meta(‘ID’) get the value.

    because the echo $polly_current_author; currently displays the correct author ID.

    Thread Starter gf

    (@gf)

    Can anybody point me in the right direction for this.

    Thanks

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