boon_
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Blog URL and .htaccessHmmm 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.
Forum: Fixing WordPress
In reply to: WordPress permalink headacheHmmm, 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.
Forum: Plugins
In reply to: [Plugin: cformsII – contact form] Country drop down listJust to say: you absolute legend!
Forum: Fixing WordPress
In reply to: Home page paginationSurely 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.Forum: Fixing WordPress
In reply to: Left Join Users and UsermetaI 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
Forum: Fixing WordPress
In reply to: get_the_tags if more than 0 (any)Edit: fixed it now with this
<?php $testtags = get_the_tags($post->ID); if ($testtags): ?> Content <?php endif; ?>
Whoops!
Forum: Fixing WordPress
In reply to: If no written excerptThanks, seems to have done the trick.
Used
<?php if ($post->post_excerpt!==''): ?> <?php the_excerpt(); ?> <?php endif; ?>
I love this community ??
Forum: Fixing WordPress
In reply to: get_the_tags and linksEdit – 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
Forum: Fixing WordPress
In reply to: Post_content with formattingFound it..
<?php echo apply_filters(‘the_content’, $post->post_content); ?>
Forum: Fixing WordPress
In reply to: Page Query AND Post Query on the same pageThat 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?
Forum: Fixing WordPress
In reply to: The Loop in page.php and other templatesOkay, 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.