Forum Replies Created
-
AuthorPosts
-
RolandParticipant
Hi Mahesh,
I just found a possible solution to this from Sakin, posted on January 29th, 2015 where he gives the following code:
<?php // Removing the Default Action Hook function unhook_catchkathmandu_functions() { remove_action( 'catchkathmandu_before_main', 'catchkathmandu_homepage_featured_position', 10 ); } add_action( 'init', 'unhook_catchkathmandu_functions' ); add_action( 'catchkathmandu_content_sidebar_start', 'catchkathmandu_homepage_featured_display', 15 );
It doesn’t seem to work – any suggestions?
Many thanks
RolandParticipantHi Mahesh,
I am indeed using a Child Theme – can you advise the code I would need to move the page text above the Featured Content?
Many thanks
RolandParticipantHi Pratik,
Which web site are you looking at? The one in question is brocuspavilion.org.uk (I use this theme on a lot of sites) and the multiple instances of Catch Kathmandu Pro directories have been created by uploading new version of the theme using Catch Updater i.e. your prescribed update method. I haven’t named or changed the names of any of these directories myself?
Thanks
Roland
RolandParticipantHi Pratik,
I am quite able to handle customisation thanks and having just spent $50 renewing my support for another year I’m not overwhelmed by your response. Clearly there is an issue here in that having updated your theme using your Catch Updater tools I am unconvinced that my site is now picking up the new theme version.
Roland
RolandParticipantHi Pratik,
I’m having this problem again in that I’ve uploaded 4.9.1 (to replace 4.9) and edited the styles.css file in the Child Theme to point to the new directory. If however I then remove the 4.9 theme I just get the WSOD. So even though I have edited the child theme to point to the new version directory it isn’t picking this up for some reason.
Any suggestions?
Thanks
October 17, 2016 at 10:17 pm in reply to: Updated to v4.8 – will I need to alter Child Theme? #101655RolandParticipantHi Pratik,
I tried that – see above (October 13, 2016 at 1:01 pm)
Roland
October 16, 2016 at 10:00 pm in reply to: Updated to v4.8 – will I need to alter Child Theme? #101568RolandParticipantHi Pratik,
Here is the theme folder structure:https://dl.dropboxusercontent.com/u/8699166/Theme%20folder%20structure.png
The version 4.7.1 theme is “catch-kathmandu-pro-3” (existing parent theme)
the version 4.8 theme is “catch-kathmandu-pro”Child theme functions.php:
<?php /** * Child Theme functions and definitions * */ add_action( 'wp_enqueue_scripts', 'catchkathmandu_child_enqueue_styles' ); function catchkathmandu_child_enqueue_styles() { wp_enqueue_style( 'catchkathmandu-parent-style', get_template_directory_uri() . '/style.css' ); } function catchkathmandu_post_sliders() { //delete_transient( 'catchkathmandu_post_sliders' ); global $post; global $catchkathmandu_options_settings; $options = $catchkathmandu_options_settings; if( ( !$catchkathmandu_post_sliders = get_transient( 'catchkathmandu_post_sliders' ) ) && !empty( $options[ 'featured_slider' ] ) ) { echo '<!-- refreshing cache -->'; $catchkathmandu_post_sliders = ' <div id="main-slider" class="container"> <section class="featured-slider">'; $get_featured_posts = new WP_Query( array( 'posts_per_page' => $options[ 'slider_qty' ], 'post__in' => $options[ 'featured_slider' ], 'orderby' => 'post__in', 'ignore_sticky_posts' => 1 // ignore sticky posts )); $i=0; while ( $get_featured_posts->have_posts()) : $get_featured_posts->the_post(); $i++; $title_attribute = apply_filters( 'the_title', get_the_title( $post->ID ) ); $excerpt = get_the_excerpt(); if ( $i == 1 ) { $classes = 'post postid-'.$post->ID.' hentry slides displayblock'; } else { $classes = 'post postid-'.$post->ID.' hentry slides displaynone'; } $catchkathmandu_post_sliders .= ' <article class="'.$classes.'"> <figure class="slider-image"> '. get_the_post_thumbnail( $post->ID, 'slider', array( 'title' => esc_attr( $title_attribute ), 'alt' => esc_attr( $title_attribute ), 'class' => 'pngfix' ) ).' </figure> <div class="entry-container"> <header class="entry-header"> <h1 class="entry-title">' . get_the_title() . '</h1> <div class="assistive-text">'.catchkathmandu_page_post_meta().'</div> </header>'; if( $excerpt !='') { $catchkathmandu_post_sliders .= '<div class="entry-content">'. $excerpt.'</div>'; } $catchkathmandu_post_sliders .= ' </div> </article><!-- .slides -->'; endwhile; wp_reset_query(); $catchkathmandu_post_sliders .= ' </section> <div id="slider-nav"> <a class="slide-previous"><</a> <a class="slide-next">></a> </div> <div id="controllers"></div> </div><!-- #main-slider -->'; set_transient( 'catchkathmandu_post_sliders', $catchkathmandu_post_sliders, 86940 ); } echo $catchkathmandu_post_sliders; } // catchkathmandu_post_sliders /** * Loading Parent theme stylesheet * */
Child theme styles.css header: https://dl.dropboxusercontent.com/u/8699166/Child%20theme%20styles.css%20header.png
Thanks
Roland
October 13, 2016 at 1:01 pm in reply to: Updated to v4.8 – will I need to alter Child Theme? #101391RolandParticipantHi Pratik,
The child theme style.css contains the URI location of the parent theme so this would presumably need to be edited to point to the URI of the updated parent theme. Having tried this and then deleted the old version theme I just see a white screen when attempting to view the site (I’ve now restored the old theme directory and everything is working again).
The old (v4.7.1) theme appears in the Themes directory as “catch-kathmandu-pro-3”
The updated (v4.8) theme appears in the Themes directory as “catch-kathmandu-pro”Any thoughts as to what the problem might be?
Thanks
Roland
RolandParticipantHi Pratik
I’ve used your options 2 & 3 and they’ve worked perfectly – many thanks indeed.
Roland
RolandParticipantHi Pratik,
That seems to have worked to an extent, however the Title text isn’t quite centred to the images above each one. You can see what I mean at http://surreynurturinglinks.org.uk
Thanks
Roland
RolandParticipantThanks – its surreynurturinglinks.org.uk
RolandParticipantHi Mahesh,
All working fine now – many thanks indeed.
Kind regards,
Roland
RolandParticipantHi Mahesh,
This seems to work, however the down side is that I can no longer see the coloured overlay box with the post title in it. I now see a thin horizontal portion of the original box, without the text?
Sorry for the protracted nature of this issue – your help is much appreciated.
Kind regards,
Roland
RolandParticipantHi Mahesh,
Apologies, I’ve checked again and the image redirection has now been suppressed – many thanks!
However when I click on the the text label I still get redirected to the image on its own page. I’d like to keep the label but stop it hyperlinking to the image page?
The web site is currently “under construction” and is only accessible via administrator login.
Kind regards,
Roland
RolandParticipantHi Mahesh,
I’m afraid I can’t get this to work, perhaps I’ve inserted it incorrectly into the child theme functions.php? Here’s the file:
<?php /** * Child Theme functions and definitions * */ add_action( 'wp_enqueue_scripts', 'catchkathmandu_child_enqueue_styles' ); function catchkathmandu_child_enqueue_styles() { wp_enqueue_style( 'catchkathmandu-parent-style', get_template_directory_uri() . '/style.css' ); } function catchkathmandu_post_sliders() { //delete_transient( 'catchkathmandu_post_sliders' ); global $post; global $catchkathmandu_options_settings; $options = $catchkathmandu_options_settings; if( ( !$catchkathmandu_post_sliders = get_transient( 'catchkathmandu_post_sliders' ) ) && !empty( $options[ 'featured_slider' ] ) ) { echo '<!-- refreshing cache -->'; $catchkathmandu_post_sliders = ' <div id="main-slider" class="container"> <section class="featured-slider">'; $get_featured_posts = new WP_Query( array( 'posts_per_page' => $options[ 'slider_qty' ], 'post__in' => $options[ 'featured_slider' ], 'orderby' => 'post__in', 'ignore_sticky_posts' => 1 // ignore sticky posts )); $i=0; while ( $get_featured_posts->have_posts()) : $get_featured_posts->the_post(); $i++; $title_attribute = apply_filters( 'the_title', get_the_title( $post->ID ) ); $excerpt = get_the_excerpt(); if ( $i == 1 ) { $classes = 'post postid-'.$post->ID.' hentry slides displayblock'; } else { $classes = 'post postid-'.$post->ID.' hentry slides displaynone'; } $catchkathmandu_post_sliders .= ' <article class="'.$classes.'"> <figure class="slider-image"> '. get_the_post_thumbnail( $post->ID, 'slider', array( 'title' => esc_attr( $title_attribute ), 'alt' => esc_attr( $title_attribute ), 'class' => 'pngfix' ) ).' </figure> <div class="entry-container"> <header class="entry-header"> <h1 class="entry-title"> <a title="Permalink to '.the_title('','',false).'" href="' . get_permalink() . '">'.the_title( '<span>','</span>', false ).'</a> </h1> <div class="assistive-text">'.catchkathmandu_page_post_meta().'</div> </header>'; if( $excerpt !='') { $catchkathmandu_post_sliders .= '<div class="entry-content">'. $excerpt.'</div>'; } $catchkathmandu_post_sliders .= ' </div> </article><!-- .slides -->'; endwhile; wp_reset_query(); $catchkathmandu_post_sliders .= ' </section> <div id="slider-nav"> <a class="slide-previous"><</a> <a class="slide-next">></a> </div> <div id="controllers"></div> </div><!-- #main-slider -->'; set_transient( 'catchkathmandu_post_sliders', $catchkathmandu_post_sliders, 86940 ); } echo $catchkathmandu_post_sliders; } // catchkathmandu_post_sliders /** * Loading Parent theme stylesheet * */
Kind regards,
Roland
RolandParticipantHi Mahesh,
Thanks for responding so quickly.
Unfortunately this doesn’t seem to work, probably because I have wrongly inserted your code. Here’s my functions.php with your code inserted:
<?php
/**
* Child Theme functions and definitions
*
*/
add_action( ‘wp_enqueue_scripts’, ‘catchkathmandu_child_enqueue_styles’ );
function catchkathmandu_child_enqueue_styles() {
wp_enqueue_style( ‘catchkathmandu-parent-style’, get_template_directory_uri() . ‘/style.css’ );
}
function catchkathmandu_post_sliders() {
//delete_transient( ‘catchkathmandu_post_sliders’ );global $post;
global $catchkathmandu_options_settings;
$options = $catchkathmandu_options_settings;if( ( !$catchkathmandu_post_sliders = get_transient( ‘catchkathmandu_post_sliders’ ) ) && !empty( $options[ ‘featured_slider’ ] ) ) {
echo ‘<!– refreshing cache –>’;$catchkathmandu_post_sliders = ‘
<div id=”main-slider” class=”container”>
<section class=”featured-slider”>’;
$get_featured_posts = new WP_Query( array(
‘posts_per_page’ => $options[ ‘slider_qty’ ],
‘post__in’ => $options[ ‘featured_slider’ ],
‘orderby’ => ‘post__in’,
‘ignore_sticky_posts’ => 1 // ignore sticky posts
));
$i=0; while ( $get_featured_posts->have_posts()) : $get_featured_posts->the_post(); $i++;
$title_attribute = apply_filters( ‘the_title’, get_the_title( $post->ID ) );
$excerpt = get_the_excerpt();
if ( $i == 1 ) { $classes = ‘post postid-‘.$post->ID.’ hentry slides displayblock’; } else { $classes = ‘post postid-‘.$post->ID.’ hentry slides displaynone’; }
$catchkathmandu_post_sliders .= ‘
<article class=”‘.$classes.'”>
<figure class=”slider-image”>
‘. get_the_post_thumbnail( $post->ID, ‘slider’, array( ‘title’ => esc_attr( $title_attribute ), ‘alt’ => esc_attr( $title_attribute ), ‘class’ => ‘pngfix’ ) ).’
</figure>
<div class=”entry-container”>
<header class=”entry-header”>
<h1 class=”entry-title”>
‘.the_title( ‘<span>’,'</span>’, false ).’
</h1>
<div class=”assistive-text”>’.catchkathmandu_page_post_meta().'</div>
</header>’;
if( $excerpt !=”) {
$catchkathmandu_post_sliders .= ‘<div class=”entry-content”>’. $excerpt.'</div>’;
}
$catchkathmandu_post_sliders .= ‘
</div>
</article><!– .slides –>’;
endwhile; wp_reset_query();
$catchkathmandu_post_sliders .= ‘
</section>
<div id=”slider-nav”>
<
>
</div>
<div id=”controllers”></div>
</div><!– #main-slider –>’;set_transient( ‘catchkathmandu_post_sliders’, $catchkathmandu_post_sliders, 86940 );
}
echo $catchkathmandu_post_sliders;
} // catchkathmandu_post_sliders/**
* Loading Parent theme stylesheet
*
*/Kind regards,
Roland
RolandParticipantHi Mahesh,
I would also like to remove the links associated with my slider images, however I’m using the post-slider option rather than the category-slider. Can I simply substitute all instances of “category” with “post” in your code or is that too simplistic?
Thanks
Roland
RolandParticipantHi Mahesh,
Apologies! I pasted the wrong URL – the one using Catch Kathmandu Pro is at http://brocuspavilion.org.uk
Thanks
Roland
RolandParticipantHi Mahesh,
The site is at roly.org.uk and I updated the site manually, as per the instructions.
Regards,
Roland
RolandParticipantThanks Mahesh – my site is currently under development and running on MAMP so I can’t post the site URL. I’ve done as you suggest and it seems to have worked – what confused me is that the #Footer Background Color was showing as being black on the colour menu and not the blue as it appears by default on the actual page so maybe there is an issue here?
Regards,
Roland
-
AuthorPosts