gulliver
Forum Replies Created
-
Forum: Networking WordPress
In reply to: SearchThanks. I shall look for some; I hadn’t even thought of plugins – I wa shoping it was part of core functionality.
Forum: Networking WordPress
In reply to: Non-root install for directories on same site.Thanks.
Oh well, I’d have preferred to keep the root clear.
Forum: Fixing WordPress
In reply to: Trying to better understand ways of writing php.Thanks. I must be one of the odd types who finds it easier to read with the indents removed – I think this comes from my not really understanding much of it, and hence getting confused by code in which closing curly brackets appear in the middle of a line with several blank lines in between.
Forum: Fixing WordPress
In reply to: Conditional statement didn't work as expected.Thanks.
I’d read that page a lot before posting, and on a re-look still don’t understand why the ‘is_home’ doesn’t apply the required treatment – because the page is ‘the main blog page’ and seems to meet the ‘so if you’ve set a static page for the Front Page, then this will only be true on the page which you set as the “Posts page”‘ requirement.
And, I’m even more confused that ‘is_front_page() ‘ does work – as the ‘clips’ page on which blog content is posted clearly doesn’t meet the ‘the front of the site is displayed’ requirement.
Having thought more about this, I’ve recoded to something simpler – because the original code was used in an index.php template, in a theme which didn’t have a home.php, and hence needed the ‘is_home’ condition.
I since realised that now I’ve added a home.php template and have a static front page (which uses a front-page.php template), home.php is only used to deliver the blog content pages and so doesn’t need any ‘is_’ condition and hence the requirement for different code on subsequent pages can be covered thus:
<?php if ( $paged < 2 ) {echo 'Text for first page.';} else {echo 'Text for subsequent pages.';} ?>Forum: Fixing WordPress
In reply to: Modify html title element to include site 'section' name.Thanks.
Since originally posting I went back to it and after a bit of searching and experimenting came up with something which seems to work:
<title><?php /* Print the <title> tag based on what is being viewed. */ // Add the site name and separator. bloginfo('name'); echo ' | '; // Add the site description for the front page. $site_description = get_bloginfo('description', 'display'); if ( $site_description && ( is_front_page() ) ) echo "$site_description"; // Custom title for 404. if (is_404()) echo 'file not available'; // Custom title for search results. if (is_search()) {echo 'search result for: '; the_search_query('');} // Show parent page title. if($post->post_parent) {$parent_title = get_the_title($post->post_parent); echo $parent_title. ' : ';} if (is_page()) wp_title(''); // Show page title on posts page. if (is_home()) wp_title(''); // Show section title on posts. if (is_single()) wp_title('Clips: '); // Add a page number if necessary: if ($paged >= 2 || $page >= 2 ) echo ' - ' . sprintf( __('page %s'), max($paged, $page) ); ?> </title>(In this example, the site has a static front page and the posts page is ‘clips’.)
I don’t pretend to understand much of this stuff, and there’s a few things which seem odd but without which I couldn’t get things to dispay as required.
If there’s anything that’s a problem, please tell me.
Forum: Fixing WordPress
In reply to: Modify html title element to include site 'section' name.Thanks. I’ll look at that option – and still prefer to hardcode them with functions and conditionals though.
Forum: Fixing WordPress
In reply to: Potential hack – what to check and do?Thanks.
Clearly, this very quickly becomes a complex issue, beyond the ability of non-tech types (among which I include myself) to understand and fix.
Forum: Fixing WordPress
In reply to: Potential hack – what to check and do?Thanks.
That’s helpful for tightening security.
I’m still unsure though on just what to look for within WP, to see what might have been changed (Wp files altered, and/or additional ones added) by such an attack.
Forum: Fixing WordPress
In reply to: Change comment author.Thanks.
What I’d meant was ‘Is there a way to mass-edit them and set them all to the same author?’
Because the import brought them across with the same @blogger/blogspot system email address, WP has them all as comments not from one author but for a different author for each comment.
What I wanted to avoid was having to open each individually and assign them to the same author so they could be appopriately styled.
What’s odd is that it includes the content from the first entry with such content, but not any others.
Jibu Pro.
Forum: Plugins
In reply to: Jibu Pro – search doesn't include questions and answers.Update… I’ve since learned that ‘A lot of plugins will insert data into posts using shortcodes. Because this data is inserted run-time it is not included in any search results – the data is invisible.’
‘Search Unleashed’ is a suggested solution.
Forum: Fixing WordPress
In reply to: Rename -2 permalinkThere’s nothing with the same title, and nothing in the trash.
And if I create another numerically-titled page – with a ridiculous amount of digits which remove any possibility of thre being an earlier page similarly-named – it still adds the -2.
Forum: Fixing WordPress
In reply to: Redirect static front page.I happily take your point, and this’ll have to be something to which I might return another day.
Forum: Fixing WordPress
In reply to: Redirect static front page.Not in my install…
I just renamed ‘front-page.php’ to ‘redirect.php’ (the template called in page attributes) – and it doesn’t load correctly. Re-renaming to ‘front-page.php’ makes it redirect.