Alignment With my Theme's Columns

Home Forums MapPress Support Alignment With my Theme's Columns

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #9701
    quentro
    Participant

    Hei, the MApPress Shortcode doesn’t work properly with my WP-Site (http://lagerlager.ch/boulderpirat) the map shows up, even if I use the separator tag…

    It also overwrites the excerpt…

    Is there a solution?

     

    Thanks  a lot

    #9703
    Chris
    Keymaster

    Hi, I checked the link you sent, but I’m not sure I understand.

    Where do you want the map to appear?  At the top?  It’s too wide for the column.

    The theme is applying CSS ‘float:left’ to everything to make the columns.

    What happens if you create the page *without* the columns?

    Some things to try:

    1.  Put the map shortcode on its own line, if you haven’t already.  It should look like ths in the html editor:

    <p>

    shortcode

    </p>

    2.  If you want the map to NOT float, you can apply some CSS before or after it:

    <div style=’clear:both’></div>

    3.  You can check the CSS by using IE debugging tools or Firebug for Firefox

     

    #9710
    quentro
    Participant

    Hi, thank you

    i want the map to appear only on the single post page, not on the homepage. I tried to use the <!–more–> but it didn’t work. The post looks like this:

    Intrinsicly visualize proactive human capital whereas synergistic best practices. Efficiently parallel task user-centric web-readiness with bleeding-edge infomediaries. Globally embrace out-of-the-box growth strategies with future-proof “outside the box” thinking.

    <!–more–>

    [mappress mapid=”2″]

    But as you can see, on the Homepage, the map appears on top (right after the title), but it shouldn’t be there at all….

     

     

    #9718
    Chris
    Keymaster

    Hi,

    Ok, I understand now.

    Does this still happen if you are using the twentyeleven theme?  Or only with your custom theme?

    I think the default excerpt function normally does remove shortcodes using the WP function strip_shortcodes().  And MapPress tries to suppress maps in excerpts.  But some themes use their own excerpt function and depending on how it’s coded MapPress can’t detect it.

    In that case you must change your excerpt function to disable the ‘mappress’ shortcode.

    You can ask the theme author about how to do this.  Or you can usually find the custom excerpt function in the ‘functions.php. file and change it.

    It depends on your theme, but there are also many suggestions about how to fix this problem on the web – for example:
    http://www.mrmuh.com/2012/01/wordpress-remove-shortcodes-from-excerpt-on-the-front-page/

     

    #9720
    quentro
    Participant

    Thank you so much. Top support.

    Bought now the Pro version.

     

    Regards

    #9722
    quentro
    Participant

    Last question, sorry:

    http://lagerlager.ch/boulderpirat/category/schwierigkeit/7c-nirvana/

    I need to remove the shortcode also from the search results (see link above). I tried following:
    function remove_shortcode_from_search($content) { if ( is_search() ) { $content = strip_shortcodes( $content ); } return $content; } add_filter('the_content', 'remove_shortcode_from_search');
    But it didn’t work…

    #9723
    quentro
    Participant

    Last question, sorry:

    http://lagerlager.ch/boulderpirat/category/schwierigkeit/7c-nirvana/

    I need to remove the shortcode also from the search results (see link above). I tried following:
    function remove_shortcode_from_search($content) { if ( is_search() ) { $content = strip_shortcodes( $content ); } return $content; } add_filter('the_content', 'remove_shortcode_from_search');
    .But it didn’t work..

    #9731
    Chris
    Keymaster

    Hi,

    What code did you use to remove the shortcode from the main page (your first question)?  That one seems to be working.

    This is more of a theme question than something for MapPress, but I would be happy to try to help you.

    Do you know what PHP template file the theme is using to display the results?  If so, please send me an email with that file and also the theme’s ‘functions.php’.  I’ll take a look for you and post back here.

    My email: chrisvrichardson at mappresspro.com.

    #9743
    quentro
    Participant

    I used the shortcode strip
    function remove_shortcode_from_index($content) { if ( is_home() ) { $content = strip_shortcodes( $content ); } return $content; } add_filter(‘the_content’, ‘remove_shortcode_from_index’);
    and added is_category, now it works 🙂

    function remove_shortcode_from_index($content) {

    if ( is_home() || is_category() ) {
    $content = strip_shortcodes( $content );
    }
    return $content;
    }
    add_filter(‘the_content’, ‘remove_shortcode_from_index’);

     

    #9744
    Chris
    Keymaster

    Great, I’m glad you got it working!  Let me know if you have other questions.

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.