Jeff Cole
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Creating page listing all post headings in certain categoriesWhat the code above is doing is creating a template for a WordPress Page (in the strict WordPress sense), not a template for archive post page.
It lists the titles of the posts from categories defined in the repeated section, although I’ve just realised that you don’t need to repeat the repeat section just add categories to the query, ie
<?php query_posts('cat=2,6,17,38'); ?>
instead of<?php query_posts('category_name=sample1'); ?>
What’s different is that if you have an
<?php if (is_page()) { ?>
statement in the sidebar then the bits of code at the beginning and the end keep the sidebar seeing the page as a Page, otherwise it would be seen as a post page.Forum: Fixing WordPress
In reply to: I Want to choose the category that appears in the PermalinkI have an idea that it might be possible to make a plugin or a hack that forces WordPress see a new order of categories both when they are in the Permalink and when they appear in the_category() in the loop. Is this true?
Forum: Installing WordPress
In reply to: Hiding the plugins directory from publicIs it possible to get the 403 error page to redirect to somewhere else either a more pretty 403 error page or maybe the blog home page? Maybe with a plugin or more code in the .htaccess?
Forum: Fixing WordPress
In reply to: I Want to choose the category that appears in the PermalinkAny ideas, though, about my question?
Forum: Fixing WordPress
In reply to: I Want to choose the category that appears in the PermalinkCan you delete my other one as well?
Forum: Fixing WordPress
In reply to: Category ViewPlugin Fold Category List will do what you want
https://www.webspaceworks.com/resources/wordpress/31/
Quoting from there:
“To use, simply replace the code fragment that looks like this
<?php wp_list_cats ($args); ?>
with this:
<?php wswwpx_fold_category_list ($args); ?>
“I expect you will find this in your sidebar.php in your theme folder.
Forum: Fixing WordPress
In reply to: Restricting a roles page editing/creation permissionsIf you are using the Role Manager plugin https://redalt.com/Resources/Plugins/Role+Manager then it looks like you need to give them Author status.
Forum: Fixing WordPress
In reply to: Creating page listing all post headings in certain categoriesI’m not sure where I got this information from now but here’s some code that I’ve used to create a page template with posts in it:
<?php
/*
Template Name: Samples
*/
?>
<?php get_header(); ?><?php $temp_query = $wp_query; // keeps page status intact when reversed below ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<h2 class="posttitle" id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e('Permanent link to'); ?> <?php the_title(); ?>"><?php the_title(); ?></a></h2>
<?php edit_post_link(__('Edit'), '', ''); ?>
<div class="postentry">
<?php the_content("__('Read the rest of this entry »')
"); ?>
<?php wp_link_pages(); ?>
</div>
<?php endwhile; endif; ?><?php rewind_posts(); // repeat from here for multiple categories?>
<?php query_posts('category_name=sample1'); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<h2 class="posttitle" id="post-<?php the_ID(); ?>"><a>" rel="bookmark" title="<?php _e('Permanent link to'); ?> <?php the_title(); ?>"><?php the_title(); ?></a></h2><?php endwhile; endif; // repeat section end ?>
<?php $wp_query = $temp_query; // returning the 'page' status?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>The first section is the ‘page’ part with any text you might want to write to introduce the posts in the category below. Then just copy and paste the repeat section any number of times with different categories named. The page status stuff I found I needed in order for the sidebar code to realise it was a page rather than a post, however if you are using PHP5 rather than PHP4, as I am, on your server you’ll need to change
<?php $temp_query = $wp_query; ?>
to
<?php $temp_query = clone $wp_query; ?>
This goes in your theme folder (with adjustments I imagine) and you’ll choose Samples as you template when creating the page.
PS I’ve never tried to post code before so hopefully it hasn’t got munged. If you use a text editor like Notepad2 – https://www.flos-freeware.ch/notepad2.html – the colours should make it a lot clearer if you save this to a textfile named eg samples.php
Forum: Plugins
In reply to: Plugin for closing comments after a period of time – any such thing?If you look in the WordPress support docs you’ll find this page for comments plugins. I can see one you might want there.
Forum: Fixing WordPress
In reply to: Removing Height in html to show full photosizeMay I suggest you experiment with the options for the image which you obviously found by clicking on the thumbnail in the uploads panel?
You may not have noticed that if you click on ‘using original’ it changes to ‘using thumbnail’, similarly ‘linked to image’ changes to ‘linked to thumbnail’ and ‘not linked’. See what you get by changing the options and clicking on ‘send to editor’ and then viewing your results to see what you like.
By the way this is without the ‘visual rich editor’ turned on – it may be different if you are using that. I don’t get any height references in the html, just to differently sized images – the small one with ‘thumbnail’ added to the name.
See my reply to this post
Forum: Everything else WordPress
In reply to: Is it possible to add video without embed? upload from fileYou could try using a plugin to make it easier, eg with YouTube a user would just have to know their YouTube video id
https://www.viper007bond.com/wordpress-plugins/vipers-video-quicktags/
Viper’s Video Quicktags
Forum: Fixing WordPress
In reply to: Restrict access outside WordPressHideThis plugin may be what you want. It hides a selected portion of your post from readers who are not logged in.
https://edwards.org/2006/03/12/hidethis-v10-plugin-for-wordpress/
Forum: Fixing WordPress
In reply to: removing index.php from URLsYou can find out how to do (1) in the WordPress codex
https://codex.www.ads-software.com/Using_Permalinks#Creating_Rewrite_Rules_.28.htaccess.29
Basically you need to make .htaccess rewriteable and go to /wp-admin/options-permalink.php on your site to set the options, which I guess you’ve done.
For (2) you can make sure that you restrict the site to either use www or not with Enforce www. Preference plugin
Forum: Fixing WordPress
In reply to: Embed FlashI looked at all the swf embed plugins I could find and found that
https://www.ssdesigninteractive.com/ssdesign/?p=82
Flash Quicktag plugin for WordPress
was the most straightforward and it works well. It inserts the correct html into your post for you for a flash object. I’d give it a try unless you are set on a java based approach.