ashleycox
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Automatically link image blocks to original image fileThanks for your reply. I’d rather not do it on every page request, as you say – very inefficient. Could you give an example of the regex to achieve this? It would be great to see someone (more experienced than I) wrap up this functionality in a plugin. Something called, perhaps, ‘image link changer’ that could handle the necessary queries to set links to either none, media file or attachment page.
Thank you, exactly what I was looking for. Knew it had to be in there somewhere! Somewhat related, is there a hook I can use to insert a block of html in-between the rows of posts? I’d like to insert an Adsense block between the rows, if possible!
Forum: Themes and Templates
In reply to: [Customizr] Customising the Featured Posts SliderThanks! As long as it will show a placeholder image, that’s good enough. I didn’t want posts not to appear simply because they don’t have images attached.
Forum: Themes and Templates
In reply to: [Serene] Change colour of orange slider under navigation?Thanks Andrew – that worked! ??
Forum: Themes and Templates
In reply to: [Serene] Change colour of orange slider under navigation?Thanks Andrew – I’ve made your suggested change in a child theme, but no luck! I changed #et_active_menu_item as suggested, but the bar still shows orange.
I know my child theme is working. Even changing #et_active_menu_item in the main theme CSS has no effect.
Any other ideas?Forum: Themes and Templates
In reply to: [Serene] Change colour of orange slider under navigation?https://www.revitalisecollagen.co.uk
just under the navigation bar items, where the currently active item is shown
Thanks for your helpForum: Themes and Templates
In reply to: [Serene] Alter category.php to show sub categories?Thanks; It’s still not working as expected, even though only child categories have posts. Looking at the code though, it should work; so it’s probably an issue with my site, which right now I don’t have time to fix. Thanks though for the solution; I’m sure it’ll work when I have a bit more time ??
Forum: Themes and Templates
In reply to: [Serene] Alter category.php to show sub categories?Sorry; I mean a parent category. So for example, if I had the following category structure:
reviews>speakers>floorstanding-speakers
reviews would be the “top level” category.
SO, if the user of my site visited the “reviews” category archive, they would see a link to “speakers”. If they visited the speakers category, they’d see a link to “florstanding-speakers”.
Some of my parent categories have no child categories – in this case, I’d like that category archive to show the posts. However, when a parent category has children, only the lowest level categories have posts.
Hope this makes sense ??Forum: Themes and Templates
In reply to: [Serene] Alter category.php to show sub categories?Here’s category.php:
<?php /** * @package Serene * @since Serene 1.0 */ get_header(); if ( have_posts() ) : while ( have_posts() ) : the_post(); get_template_part( 'content', get_post_format() ); endwhile; get_template_part( 'includes/navigation', 'index' ); else: //get_template_part( 'includes/no-results', 'index' ); $cat=get_query_var('cat'); $args = array( 'orderby' => 'name', 'parent' => $cat, 'order' => 'ASC' ); $categories = get_categories($args); foreach($categories as $category) { echo '<p>Category: <a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a> </p> '; echo '<p> Description:'. $category->description . '</p>'; } endif; get_footer(); ?>
Forum: Themes and Templates
In reply to: [Serene] Alter category.php to show sub categories?Still doesn’t seem to be working; I’ve edited category.php as suggested, but viewing the category still displays a list of posts in child categories, rather than the child categories themselves. Perhaps I’m using the functions incorrectly? I’m trying to:
If the category is a top level category, display a list of its parents.
If the category is a child category, display its postsForum: Themes and Templates
In reply to: [Serene] Alter category.php to show sub categories?Thanks.
Forum: Themes and Templates
In reply to: [Serene] Alter category.php to show sub categories?Thanks – I thought it may be those functions. Get_categories requires a category ID; from where do I get that? Surely it’s not via $_GET.
Forum: Fixing WordPress
In reply to: Show category>subcategory>postsThanks for your reply. I’m not looking to do a dropdown menu; what I’m looking for is that each category page shows a list of categories, unless it is the lowest level category; in which case, it shows the posts.
If necessary; I’ll have to modify my theme and do this in PHP. Just was kindaa hoping there would be an easier way, given that WP is supposed to be point n’ click… or am I perhaps just getting lazy?Forum: Fixing WordPress
In reply to: Show category>subcategory>postsOK, Progress. Using a widget called ‘NS Category Widget’, I’ve managed to get only the top level categories to display on my pages, irespective of whether they contain any posts.
So all that’s left is to figure out how to:
When a user clicks a category, present the user with a list of categories on the resulting pageAny ideas?
Thanks for that – Am experimenting with contact form 7 and it looks like it will better meet my needs, so have decided to use that. Thanks for the recommendation ??