Forum Replies Created

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter boon_

    (@boon_)

    Hmmm it doesn’t seem to be able to update the .htaccess remotely, even though it is set to 777.

    I’ve tried t31os’s suggestion of editing the RewriteRule but it still does the same /about/blog/ thing.

    Even after resetting permalinks it still says I need the .htacess I listed in my first post.

    Thread Starter boon_

    (@boon_)

    Hmmm, have found this post: https://www.weberz.com/blog/2009/06/wordpress-cms-blog which explains why.

    Think I’ll have to go with the archives not consistent with the other permalinks as opposed to starting every post permalink with a number.

    Here https://codex.www.ads-software.com/Using_Permalinks#Structure_Tags it also says you should not start your permalinks with category, post name or tag.

    Just to say: you absolute legend!

    Thread Starter boon_

    (@boon_)

    Surely not if I wanted the permalinks to remain consistent?

    If I do as you say then a blog post ends up at /general/post-title when in reality it should fall at /about/news/general/post-title as the blog is inside the about section.

    Thread Starter boon_

    (@boon_)

    I am using the cimy user extra fields plugin and I have set up a field called ACCOUNT_STATUS with a drop down box of “Visible” or “Invisible” for user profile status. I am only trying to list users who have the preference “Visible”.

    I’ve just realised I can accomplish what I’ve been trying using this

    <?php
    $order = 'user_nicename';
    $users = $wpdb->get_results("SELECT * FROM $wpdb->users ORDER BY $order");
    foreach($users as $user) :
    ?>
    	<?php if (get_cimyFieldValue($user->ID,'ACCOUNT_STATUS')=='Visible'): ?>
    	<tr>
    		<td><?php echo $user->user_login; ?></td>
    		<td><?php echo get_cimyFieldValue($user->ID,'ACCOUNT_AFFILIATION'); ?></td>
    		<td><?php echo $user->user_email; ?></td>
    	</tr>
    	<?php endif ;?>
    <?php endforeach; ?>

    But the query here is still pulling out ALL users, then checking them. I was trying to streamline it with a combined query so that it doesn’t pull out needless entries. So that if there are say 1000 users, load time isn’t compromised.

    Thanks a lot

    Thread Starter boon_

    (@boon_)

    Edit: fixed it now with this

    <?php $testtags = get_the_tags($post->ID); if ($testtags): ?>
    Content
    <?php endif; ?>

    Whoops!

    Thread Starter boon_

    (@boon_)

    Thanks, seems to have done the trick.

    Used

    <?php if ($post->post_excerpt!==''): ?>
    <?php the_excerpt(); ?>
    <?php endif; ?>

    I love this community ??

    Thread Starter boon_

    (@boon_)

    Edit – fixed it with this ??

    echo '<li><a href="https://www.mysite.co.uk/tag/'.$tag->slug.'" rel="tag">'.$tag->name.'</a></li>';

    to make..

    <?php
       global $post;
       foreach(get_the_tags($post->ID) as $tag) {
    	  echo '<li><a href="https://www.mysite.co.uk/tag/'.$tag->slug.'" rel="tag">'.$tag->name.'</a></li>';
       }
    ?>

    Didn’t try the other

    Thread Starter boon_

    (@boon_)

    Found it..

    <?php echo apply_filters(‘the_content’, $post->post_content); ?>

    Thread Starter boon_

    (@boon_)

    That helped me – never tried that and will use it in future. Thanks ??

    It still doesn’t work calling page data with any sort of query/loop however.

    The only way I can get it work by using no loop at all just putting the page content onto the page directly using <?php echo $post->post_title; ?> etc.

    This is problematic for <?php echo $post->post_content; ?> as it strips the WYSIWYG paragraph tags but I guess it’ll have to do for now unless anyone has a better solution?

    Can you pull <?php echo $post->post_content; ?> whilst retaining the paragraph tags?

    Thread Starter boon_

    (@boon_)

    Okay, thanks. Query posts is the answer.

    What about the second part? When using the page template not page.php it’s recognising the page as home so is putting my “is_home” content in ??

    This is also stopping my NavXT breadcrumb from functioning correctly.

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