Forum Replies Created

Viewing 15 replies - 76 through 90 (of 2,832 total)
  • Theme Author Richie KS

    (@rkcorp)

    open lib/functions/theme-functions.php and edit the functions dez_get_custom_the_excerpt() to

    function dez_get_custom_the_excerpt($limit='',$more='') {
    global $post;
    if($limit == 'disable' || $limit == '0') {
    $excerpt = '';
    
    } else {
    
    $thepostlink = '<a class="readmore" href="'. get_permalink() . '" title="' . the_title_attribute('echo=0') . '">';
    $custom_text = get_post_field('post_excerpt',$post->ID);
    $all_content = get_the_content();
    //Regular expression that strips the header tags and their content.
    $regex = '#(<h([1-6])[^>]*>)\s?(.*)?\s?(<\/h\2>)#';
    $content = preg_replace($regex,'', $all_content);
    
    //if use manual excerpt
    if($custom_text) {
    if($more) {
        $excerpt = $custom_text . $thepostlink . $more . '</a>';
        } else {
        $excerpt = $custom_text;
        }
    
    } else {
    
    //check if its chinese character input
    $chinese_output = preg_match_all("/\p{Han}+/u", $post->post_content, $matches);
    if($chinese_output) {
    
    if($more) {
    $excerpt = mb_substr( get_the_excerpt(), 0, $limit*2 ) . '...' . $thepostlink . $more.'</a>';
    } else {
    $excerpt = mb_substr( get_the_excerpt(), 0, $limit*2 ) . '...';
    }
    
    } else {
    
    //remove caption tag
    $content_filter_cap = strip_shortcodes( $content );
    //remove email tag
    $pattern = "/[^@\s]*@[^@\s]*\.[^@\s]*/";
    $replacement = "";
    $content_filter = preg_replace($pattern, $replacement, $content_filter_cap);
    
    if($more) {
        $excerpt = wp_trim_words($content_filter, $limit) . $thepostlink.$more.'</a>';
        } else {
        $excerpt = wp_trim_words($content_filter, $limit);
        }
    }
    }
    }
    return apply_filters('meso_get_custom_excerpt',$excerpt);
    }
    Theme Author Richie KS

    (@rkcorp)

    sometime this happen when the custom css you added in customizer->additional css or the theme customizer->general->custom css had unclose bracket or wrong code etc, double check the css code.

    try modified this code from
    https://wordpress.org/support/topic/add-the-featured-image-to-the-top-of-each-single-post-page/#post-10026653

    to this

    function meso_add_feat_img_single() {
    global $post;
    if ( has_post_thumbnail() && is_single() && get_post_type() == 'post') {
    echo '<div id="custom-img-header">';
    echo get_the_post_thumbnail( $post->ID, 'full' );
    echo '</div>';
    }
    }
    add_action('bp_inside_header','meso_add_feat_img_single',10);

    this is to make sure, the header image only show in post type – post, not custom post type.

    although i’m not sure if this error notice might cause the screen bug in your listing

    ”Notice: Undefined offset: 1 in /www/wp-content/plugins/ml-slider-pro/modules/theme_editor/theme_editor.php on line 1420”

    did disabling this plugin-ml-slider-pro fix the page?

    • This reply was modified 8 years, 4 months ago by Richie KS.
    • This reply was modified 8 years, 4 months ago by Richie KS.
    Theme Author Richie KS

    (@rkcorp)

    its cause by the slider, disable it or setup it properly in customizer.

    Theme Author Richie KS

    (@rkcorp)

    try add this to custom css

    img.avatar { max-width:48px;height:auto; }

    for the header image height control, maybe this

    #custom-img-header { max-height:500px; overflow:hidden; }

    this will set max height for the header to 500px;

    Theme Author Richie KS

    (@rkcorp)

    no need to add widget there, just add this to functions.php

    function meso_add_custom_intro_text() { ?>
    <div class="post-content" style="font-size:1.2em;margin:1em 0 2em 0;padding:0;border-bottom:1px solid #ddd;">
    <img class="alignleft" src="http://www.thesecretrealestateagent.com/wp-content/uploads/2018/01/PREPARING-TO-MOVE-150x150.jpg" /><p>Each state has their own rules and laws however; here are a few FAQ that may be helpful. Remember a Real Estate Agents are not an attorney and it is recommended that you seek advice with an attorney for ALL.</p><p>some text...Before you are too far along in the sale of your property, investigate how this sale will affect you. Remember, the better prepared you are for selling, the more likely you are to get the best net return from the <a href="#">some link to about etc</a></p>
    </div>
    <?php }
    add_action('bp_before_blog_entry','meso_add_custom_intro_text',50);

    edit the inner text html to your own.

    Theme Author Richie KS

    (@rkcorp)

    add this to custom css for the vertical hor nav

    .footer-right ul {width:100%;float:left;}
    .footer-right ul li {clear:both;float:right;}

    add this to functions.php to add new widget footer left

    function meso_register_footer_left_widget() {
     	register_sidebar( array(
            'name' => __('Footer Left Widget Area', 'mesocolumn'),
            'id' => 'footer-left-widget',
            'description' => __( 'The footer left widget area', 'mesocolumn' ),
            'before_widget' => '<aside id="%1$s" class="widget %2$s">',
            'after_widget' => '</aside>',
            'before_title' => '<h3 class="widget-title">',
            'after_title' => '</h3>',
        ) );
    }
    add_action( 'widgets_init', 'meso_register_footer_left_widget',20 );
    
    function meso_add_footer_left_widget() {
    if ( is_active_sidebar( 'footer-left-widget' ) ) : ?>
    <div class="fleft-widget">
    <?php dynamic_sidebar( 'footer-left-widget' ); ?>
    </div>
    <?php endif; ?>
    <?php }
    add_action('bp_footer_left','meso_add_footer_left_widget',20);
    
    function meso_add_footer_left_widget_style() { ?>
    .fleft-widget aside {margin:0;width:100%;float:left;}
    .fleft-widget ul li { list-style:none; }
    .fleft-widget h3 { font-size:1.3em;margin:1em 0 0.25em; }
    <?php }
    add_action('wpmeso_custom_css','meso_add_footer_left_widget_style',70);

    there should be new widget area in wp-admin->appeareance->widgets

    Theme Author Richie KS

    (@rkcorp)

    how about a screenshot?

    Theme Author Richie KS

    (@rkcorp)

    can’t really tell without a live site preview…

    Theme Author Richie KS

    (@rkcorp)

    need to go to customizer->homepage featured category->design and layout->edit the excerpt number to refresh the setting.

    need to enable auto featured image in customizer->general->post->enable auto grab featured image.

    Theme Author Richie KS

    (@rkcorp)

    ok, i don’t think background full image is possible. try this.
    remove the previous code and css and add this to functions.php

    function meso_add_feat_img_single() {
    global $post;
    if ( has_post_thumbnail() && is_single() ) {
    echo '<div id="custom-img-header">';
    echo get_the_post_thumbnail( $post->ID, 'full' );
    echo '</div>';
    }
    }
    add_action('bp_inside_header','meso_add_feat_img_single',10);

    this will add full width featured post image in header when in single post/page. however you need to disable custom image header if you’re using one.

    • This reply was modified 8 years, 4 months ago by Richie KS.
    • This reply was modified 8 years, 4 months ago by Richie KS.
    Theme Author Richie KS

    (@rkcorp)

    try add this to functions.php

    function meso_add_feat_img_single() {
    if ( has_post_thumbnail() && is_single() ) {
    the_post_thumbnail('full', ['class' => 'feat_img_top_post']);
    }
    }
    add_action('bp_before_post_content','meso_add_feat_img_single');

    and add this to custom css

    img.feat_img_top_post {max-width:100%;height:auto;margin:0;}

    Theme Author Richie KS

    (@rkcorp)

    try add this to custom css

    @media only screen and (max-width:770px) {
        #custom #top-navigation .sf-menu {display:inline !important;}
        #custom #mobile-nav {display:none !important;}
    }
    Theme Author Richie KS

    (@rkcorp)

    #slider
    something is conflict with the wp built-in jquery, in console, it showing the error trigger by youtube related code/js.

    maybe try js in footer solution like this
    https://gist.github.com/ethangardner/907786

    not sure if it will work tho since this involve code from wp core.

    Theme Author Richie KS

    (@rkcorp)

    try change a bit, the num

    remove_action(‘bp_inside_container_wrap’, ‘meso_add_primary_nav’,20);
    add_action(‘bp_before_container_wrap’, ‘meso_add_primary_nav’,25);

    higher if still not working or remove the num in remove_action

    Theme Author Richie KS

    (@rkcorp)

    need to see live site to check source code.

Viewing 15 replies - 76 through 90 (of 2,832 total)