-
AuthorPosts
-
August 5, 2014 at 7:59 pm #300396
Hi, I have a few questions that I am hoping you can help with. My blog page can be viewed here http://www.marcgodfreeweddings.co.uk/blog :
1 – When viewing ‘My Blog’ (blog post excerpts) under each post I can see the date, category and author. I have managed to hide the other element (post count) but also want to hide the ‘in Blog’ link.2- Is it possible to redirect the author link to my ‘about page’ when clicked? I don’t want a separate bio page or to display previous posts.
3- When you view a blog post the breadcrumb trail shows ‘You are here: Home / My Blog / Blog / post title…’ Is there a way I can hide ‘Blog’ which I assume is the category?
Thanks in advance
MarcAugust 6, 2014 at 4:11 pm #300721Hi Marc!
Please add following code to Quick CSS in Enfold theme options under General Styling tab
span.blog-categories, .text-sep-cat { display: none !important; }
Please add following code to Functions.php file in Appearance > Editor
function add_custom_link(){ ?> <script> jQuery(window).load(function(){ jQuery('span.fn>a').attr('href','http://marcgodfreeweddings.co.uk/about'); }); </script> <?php } add_action('wp_footer', 'add_custom_link');
Regards,
YigitAugust 6, 2014 at 5:55 pm #300781Perfect Yigit, that has resolved item 1&2 – Thanks!
Any thoughts on item 3 the breadcrumb trail and how I can tidy that up?
Thanks for your help
MarcAugust 7, 2014 at 3:18 pm #301144Hey Marc!
Please go to Enfold/framework/php folder and open class-breadcrumb.php file and find
if('post' == $post_type) { $category = get_the_category();
and change it to
if('post' == $post_type) { $category = "";
Cheers!
YigitAugust 7, 2014 at 4:14 pm #301167This reply has been marked as private.August 7, 2014 at 4:20 pm #301172Hi Marc!
Can you please copy&paste the code from here – http://pastebin.com/EykPDGp4
I have tested the changes on my local installation and it does work fine on my endCheers!
YigitAugust 7, 2014 at 5:14 pm #301214Hello,
Copied and pasted as per your suggestion. I does indeed remove the ‘Blog’ element but still complains about the the line of code that follows it.
if('post' == $post_type) { $category = ""; foreach($category as $cat) { if(!empty($cat->parent)) { $parents = get_category_parents($cat->cat_ID, TRUE, '$$$', FALSE ); $parents = explode("$$$", $parents); foreach ($parents as $parent_item) { if($parent_item) $trail[] = $parent_item; } break; } } if(isset($category[0]) && empty($parents)) { $trail[] = '<a href="'.get_category_link($category[0]->term_id ).'">'.$category[0]->cat_name.'</a>'; } }
Is there anything obvious that you can see that is causing the error I posted above?
Thanks
MarcAugust 8, 2014 at 5:19 am #301445Hey Marc!
Try with this method, add this to the Quick CSS:
.single-post .breadcrumb-trail span:nth-child(5), .single-post .breadcrumb-trail span:nth-child(6) { display: none; }
Cheers!
JosueAugust 8, 2014 at 9:20 am #301501Perfect Josue,
Thanks for your help guys – much appreciated!
All the best
Marc -
AuthorPosts
- The topic ‘Blog questions – tidying up’ is closed to new replies.