• Resolved bikerwp000

    (@bikerwp000)


    I activated WP Report Post plugin today,
    http://www.esiteq.com/projects/wordpress-report-post-plugin/

    .. and supposedly a Report Post link / button should appear in all post’s meta box. But for some reason the link would not show up.

    I noticed mesocolumn theme’s post meta box (author, date, category and comment count) are built-in and are not customizable through Customize, so I’m just wondering if the reason the Report Post link would not show up in post meta box was because we need to add some codes for the link to show up in all post meta box? Thank you.

    • This topic was modified 7 years, 6 months ago by bikerwp000.
Viewing 15 replies - 1 through 15 (of 27 total)
  • Theme Author Richie KS

    (@rkcorp)

    add this to functions.php or wp-content/meso-custom-functions.php if have one

    function meso_add_report_link() {
    global $post;
    ?>
    <span style="margin:0px;" class=""><a href="#" class="report-post-link" post-id="<?php echo $post->ID; ?>">Report Post</a></span>
    <?php }
    add_action('meso_after_post_meta','meso_add_report_link');
    Thread Starter bikerwp000

    (@bikerwp000)

    Hi Richie,

    Thanks a lot for your reply. The codes work right off the bat.

    I just made a modest donation to you via your demo site at
    http://www.dezzain.com/wordpress-themes/mesocolumn/

    to thank you for your help.

    I hope you can also help me with 2 other issues that I’m having since I can’t figure out why they are how they are now.

    I’m still localhosting my site on hard drive so I include a screenshot below.

    1. When looking at my front page

    front page

    the menu on the top is not sticky and disappear as I scroll down, and Site Title and Tagline disappear after I upload a Site Logo. You demo site top menu also has a Search box to its right but I don’t know how to add that there.

    2. I got these codes from another thread to make all images on site round,

    img{border:1px solid #;
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    border-radius: 50%;
    }
    

    , but now even the image I add to the header looks round.

    I also copied another sets of codes that make all avatar round

    .avatar {
      background-color: #F5F5F5;
      border: 1px solid #DDDDDD;
      border-radius: 50% 50% 50% 50%;
      padding: 4px;
    }
    

    So I’m thinking if i can have a set of codes that will make only featured image round, then I can keep the “avatar round” sets of codes and delete the “all image round” sets of codes to prevent images that shouldn’t look round from looking round. I’m also concerned how the advertisements will look like after my site gets online. Will they also look round. That will be really odd.

    But I can’t find the codes to make only Featured Image round. Can you help me with that too?

    Thank you

    Mike

    Theme Author Richie KS

    (@rkcorp)

    thx for the donation mike.

    #add this to functions.php or wp-content/meso-custom-functions.php sticky the top nav

    function meso_float_redbar_fixed() { ?>
    <?php
    if( is_user_logged_in() ) { $log = 'true'; } else { $log = 'false'; }
    if( is_admin_bar_showing() ) { $abshow = 'true'; } else { $abshow = 'false'; } ?>
    <script type="text/javascript">
    jQuery.noConflict();
    var $st = jQuery;
    var log = <?php echo $log; ?>;
    var abs = <?php echo $abshow; ?>;
    $st(document).ready(function() {
    
    	// grab the initial top offset of the navigation
    	var sticky_navigation_offset_top = $st('#top-navigation').offset().top;
    
    	// our function that decides weather the navigation bar should have "fixed" css position or not.
    	var sticky_navigation = function(){
    		var scroll_top = $st(window).scrollTop(); // our current vertical position from the top
    
    		// if we've scrolled more than the navigation, change its position to fixed to stick to top, otherwise change it back to relative
    		if (scroll_top > sticky_navigation_offset_top) {
            if( log == true ) {
            if( abs == true ) {
            $st('#top-navigation').css({ 'z-index': '9999','position': 'fixed', 'padding': '0','top':30, 'left':0 });
            } else {
            $st('#top-navigation').css({ 'z-index': '9999','position': 'fixed', 'padding': '0','top':0, 'left':0 });
            }
            $st('#top-navigation').removeClass('effect-1');
            } else {
            $st('#top-navigation').css({ 'z-index': '9999','position': 'fixed','top':0, 'left':0 });
            $st('#top-navigation').removeClass('effect-1');
            }
    
    		} else {
    			$st('#top-navigation').css({ 'z-index': 'auto','top':0,'position':'relative','padding': '0' });
                $st('#top-navigation').addClass('effect-1');
    		}
    
    	};
    
    	// run our function on load
    	sticky_navigation();
    
    	// and run it again every time you scroll
    	$st(window).scroll(function() {
    		 sticky_navigation();
    	});
    
    	// NOT required:
    	// for this demo disable all links that point to "#"
    	$st('a[href="#"]').click(function(event){
    		event.preventDefault();
    	});
    
    });
    </script>
    
    <?php }
    add_action('wp_head','meso_float_redbar_fixed',10);

    #add image with site title etc
    add this

    function meso_add_image_title() { ?>
    <img class="alignleft" style='margin:10px 10px 0 0;' src="YOUR IMAGE FULL URL" alt="" />
    <?php }
    add_action('bp_before_site_title','meso_add_image_title');

    #add searchform top nav
    add this

    function meso_add_custom_searchform() {
    return get_search_form();
    }
    add_action(‘bp_inside_top_nav’,’meso_add_custom_searchform’,20);

    #round feat image
    try remove previous code and add this to customizer->general->custom css

    #custom article img, #custom #right-sidebar img {
     border:1px solid #ccc;
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    border-radius: 50%;
    }
    Theme Author Richie KS

    (@rkcorp)

    #add image with site title etc
    need to remove the saved logo in customizer first.

    Thread Starter bikerwp000

    (@bikerwp000)

    Hi Richie,

    Thanks for the codes. The sticky top menu and round featured image are good now thanks to your help.

    The Search box codes did not create any changes to the top menu.
    Just to be sure, the codes are

    function meso_add_custom_searchform() {
    return get_search_form();
    }
    add_action(‘bp_inside_top_nav’,’meso_add_custom_searchform’,20);

    And I added it to the functions.php of the mesocolumn child theme I’m using.

    After removing site logo and adding codes for image with site title to the functions.php, this is how it looks

    screenshot

    Then I added the Title Image and it looks the same except the image entirely replaced the Title and Tagline.

    Not sure if this matters – you see a broken image icon next to “Site title”, that icon shows up on Chrome and Microsoft Edge, but not on Firefox.

    Thank you.

    Mike

    Thread Starter bikerwp000

    (@bikerwp000)

    If the Site Title image part is not easy, it’s probably okay because I think I can probably use photo editor to put both Title / Tagline and the image all in one photo file and add it as Site Logo.

    Adding search box may be the one that needs more attention.

    • This reply was modified 7 years, 6 months ago by bikerwp000.
    Theme Author Richie KS

    (@rkcorp)

    the searchform code work in my end. try clear cache.

    Thread Starter bikerwp000

    (@bikerwp000)

    Hi Richie,

    I clear cache but the search form simply won’t show up. Can it be something blocking it? i’m clueless.

    Theme Author Richie KS

    (@rkcorp)

    check html source code if there’s a searchform <form> inside #top-navigation.

    Thread Starter bikerwp000

    (@bikerwp000)

    Hi Richie,

    This is the only portion of the HTML code page that has “top-navigation” wording in it. And I did not see any form in it.

    // grab the initial top offset of the navigation
    	var sticky_navigation_offset_top = $st('#top-navigation').offset().top;
    
    	// our function that decides weather the navigation bar should have "fixed" css position or not.
    	var sticky_navigation = function(){
    		var scroll_top = $st(window).scrollTop(); // our current vertical position from the top
    
    		// if we've scrolled more than the navigation, change its position to fixed to stick to top, otherwise change it back to relative
    		if (scroll_top > sticky_navigation_offset_top) {
            if( log == true ) {
            if( abs == true ) {
            $st('#top-navigation').css({ 'z-index': '9999','position': 'fixed', 'padding': '0','top':30, 'left':0 });
            } else {
            $st('#top-navigation').css({ 'z-index': '9999','position': 'fixed', 'padding': '0','top':0, 'left':0 });
            }
            $st('#top-navigation').removeClass('effect-1');
            } else {
            $st('#top-navigation').css({ 'z-index': '9999','position': 'fixed','top':0, 'left':0 });
            $st('#top-navigation').removeClass('effect-1');
            }
    
    		} else {
    			$st('#top-navigation').css({ 'z-index': 'auto','top':0,'position':'relative','padding': '0' });
                $st('#top-navigation').addClass('effect-1');
    		}
    
    	};
    
    	// run our function on load
    	sticky_navigation();
    
    	// and run it again every time you scroll
    	$st(window).scroll(function() {
    		 sticky_navigation();
    	});
    
    	// NOT required:
    	// for this demo disable all links that point to "#"
    	$st('a[href="#"]').click(function(event){
    		event.preventDefault();
    	});
    
    
    • This reply was modified 7 years, 6 months ago by bikerwp000.
    Theme Author Richie KS

    (@rkcorp)

    whats the top green bar id?

    Thread Starter bikerwp000

    (@bikerwp000)

    Hi Richie,

    I don’t know where to find the top green bar id and a Google search yielded no answer. But I use SiteOrigin CSS plugin for styling needs and when targeting the top green bar using this plugin, it shows the following codes

    #top-navigation.top-nav.iegradient.effect-1
    #top-navigation
    nav
    *
    
    float: left
    display: block
    zoom: 1

    Based on this, I’m guessing maybe the answer is 1.

    Also FYI, I made a styling change to the bar and the codes for that change is

    #top-navigation.top-nav.iegradient.effect-1 {
      padding: 1px;
      height: 70px;
    }
    

    Something even more intriguing I’ve just noticed is when on mobile display, before I click on Top Menu, it looks like this

    Before Clicking Top Menu

    , but after clicking Top Menu, it looks like this

    After Clicking Top Menu

    The main screen was superimposed over the menu, which makes the menu unaccessible. This happens to Chrome, Firefox and MS Edge all 3 browsers.

    I have tried to find out what caused this by removing the codes I got from you and some CSS codes I added from using SiteOrigin CSS one at a time but had no success.

    What adds more to the twist is now when on mobile and click on Top Menu, The menu got stuck on the first page and won’t scroll down. But if I remove the codes that make the top header menu sticky, then the mobile Top Menu can scroll down again. This also happens to all 3 browsers.

    I just installed and activated Paid Membership Pro this morning and found it crashed all the blog posts on my site. Once I deactivated the plugin, all posts reappeared. This is a very well-known membership plugin, I’m wondering if any of the mesocolumn users have reported such case to you, and any solution they have come up with? or an alternative membership option we can use for mesocolumn?

    I’m really sorry for so many problems. Everything went really well since I started using your theme and I really like it. Didn’t expect now near the end of creating this site, so many issues emerged.
    (Sign)

    Theme Author Richie KS

    (@rkcorp)

    change the sticky code to this

    function meso_float_redbar_fixed() { if( !wp_is_mobile() ) { ?>
    <?php
    if( is_user_logged_in() ) { $log = 'true'; } else { $log = 'false'; }
    if( is_admin_bar_showing() ) { $abshow = 'true'; } else { $abshow = 'false'; } ?>
    <script type="text/javascript">
    jQuery.noConflict();
    var $st = jQuery;
    var log = <?php echo $log; ?>;
    var abs = <?php echo $abshow; ?>;
    $st(document).ready(function() {
    
    	// grab the initial top offset of the navigation
    	var sticky_navigation_offset_top = $st('#top-navigation').offset().top;
    
    	// our function that decides weather the navigation bar should have "fixed" css position or not.
    	var sticky_navigation = function(){
    		var scroll_top = $st(window).scrollTop(); // our current vertical position from the top
    
    		// if we've scrolled more than the navigation, change its position to fixed to stick to top, otherwise change it back to relative
    		if (scroll_top > sticky_navigation_offset_top) {
            if( log == true ) {
            if( abs == true ) {
            $st('#top-navigation').css({ 'z-index': '9999','position': 'fixed', 'padding': '0','top':30, 'left':0 });
            } else {
            $st('#top-navigation').css({ 'z-index': '9999','position': 'fixed', 'padding': '0','top':0, 'left':0 });
            }
            $st('#top-navigation').removeClass('effect-1');
            } else {
            $st('#top-navigation').css({ 'z-index': '9999','position': 'fixed','top':0, 'left':0 });
            $st('#top-navigation').removeClass('effect-1');
            }
    
    		} else {
    			$st('#top-navigation').css({ 'z-index': 'auto','top':0,'position':'relative','padding': '0' });
                $st('#top-navigation').addClass('effect-1');
    		}
    
    	};
    
    	// run our function on load
    	sticky_navigation();
    
    	// and run it again every time you scroll
    	$st(window).scroll(function() {
    		 sticky_navigation();
    	});
    
    	// NOT required:
    	// for this demo disable all links that point to "#"
    	$st('a[href="#"]').click(function(event){
    		event.preventDefault();
    	});
    
    });
    </script>
    
    <?php } }
    add_action('wp_head','meso_float_redbar_fixed',10);

    this will prevent sticky on mobile, but desktop view with mobile like screen still effected. try them in actual mobile.

    #searchform
    what version of the theme you use? the code should work. check lib/functions/hook-functions.php, search meso_add_top_nav() function and see if this code exist
    <?php do_action( 'bp_inside_top_nav' ); ?>

    in ant case you can add

    get_search_form();

    before the code end </div>

    Thread Starter bikerwp000

    (@bikerwp000)

    Hi Richie,

    Thanks for the new codes. They seem to solve all the problems except the sticky mobile top menu would have to wait till I get my site hosted to get checked if they’re still sticky on the first page.

    I was finally able to see the search form after adding the short codes before the code end </div>. Since this is the first set of codes that I directly add to the parent theme, I’m wondering if the codes will be erased next time when the theme gets update? Thank you.

    Thread Starter bikerwp000

    (@bikerwp000)

    Forgot to tell you I’m using Mesocolumn Version: 1.6.5.1 and I always work on the child theme only.

Viewing 15 replies - 1 through 15 (of 27 total)
  • The topic ‘Regarding post’s meta box on mesocolumn…’ is closed to new replies.