Home › Forums › MapPress Support › Alignment With my Theme's Columns
- This topic has 9 replies, 2 voices, and was last updated 10 years, 7 months ago by
Chris.
-
AuthorPosts
-
June 23, 2012 at 12:56 am #9701
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
June 23, 2012 at 3:51 am #9703Hi, 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
June 24, 2012 at 5:37 am #9710Hi, 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….
June 25, 2012 at 6:09 am #9718Hi,
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/June 25, 2012 at 7:31 am #9720Thank you so much. Top support.
Bought now the Pro version.
Regards
June 25, 2012 at 9:35 am #9722Last 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…June 25, 2012 at 9:41 am #9723Last 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..June 25, 2012 at 8:20 pm #9731Hi,
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.
June 26, 2012 at 2:59 am #9743I 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’);June 26, 2012 at 6:08 am #9744Great, I’m glad you got it working! Let me know if you have other questions.
-
AuthorPosts
- You must be logged in to reply to this topic.