Digital experiences for all disciplines
Forum Replies Created
-
-
Hi,
Thanks for your suggestion.
Instead of overriding the value, I commented the assignation in order to avoid the query (taking into account that I’ll override it hardcoding it, I think that’s better).Final result (from single.php file, line 43):
// **** HACK **** // Deshabilitamos las opciones sociales para que no se dupliquen con el tema: // $show_social = sf_get_post_meta($post->ID, 'sf_social_sharing', true); $show_social = false; // **** HACK **** $show_related = sf_get_post_meta($post->ID, 'sf_related_articles', true); $remove_breadcrumbs = sf_get_post_meta($post->ID, 'sf_no_breadcrumbs', true); if ($show_author_info == "") { $show_author_info = true; } // **** HACK **** // Deshabilitamos las opciones sociales para que no se dupliquen con el tema: // if ($show_social == "") { // $show_social = true; // } // **** HACK ****
It worked fine for all posts.
The problem here is that I’m modifying a theme file, so I suspect that at the moment of updating it, I’ll lose this changes.
If you allow me the suggestion, I really think that you should put that (don’t show the theme social options) as a theme option in the preferences panel.
I think that since it’s pretty common to have the JetPack plugin and, as I said before, preferring the social networks “native” buttons, it seems a common scenario, and doing that, you will be avoiding the need of modify the theme files 🙂September 26, 2014 at 9:55 am in reply to: Do not show the post highlighted image as the post header #114820Hi,
What about the posts formats?
Don’t you support them?Thanks!
Hi Mohammad,
Your CSS work out for posts content, but it doesn’t work for pages.
You can see it here:
- Blog post (Ok): http://beisbolsantboi.com/campeoanto-nacional-de-beisbol-cadete-2014_6397/
- Single page (Not ok. The bus lines, texts “L72” and “SB1”, doesn’t match the CSS selector): http://beisbolsantboi.com/acerca-de/contacto/
If you want to test the selector, just go to the single page I’ve linked, open the browser console, and type it as a jQuery selector like that one:
jQuery('.single-post div.page-content div.body-text p a');
BTW: Thanks for your support, you’re being very helpful 🙂
Ok. And with the CSS that I’ve specified I will not miss any kind of device in which I’ll be showing up the previous grey color?
Hi,
Thanks for the support, I did it taking into account tablets devices also:
@media only screen and (max-width: 991px) { body { background-color: #fff; } }
The problem here is that I’m using a custom CSS for something that I suspect I would have to do through the theme customization settings (attached image). The problem is that I don’t know which property defines this color, can you indicate that to me, please?
Thanks
Attachments:
You must be logged in to view attached files.Hi,
Yes, for sure it’ll work, but I’m wanting a way to do that without having to edit *all* the links of my site adding a new class.
Thanks
Hi,
I did that for this post and it worked fine, but:
- Is there any way to disable this at a Theme Preference level? I mean: I will not want that for any post, so It’s a pity having to uncheck that for every previous and future posts. Like “By default, set it as unchecked”.
- At least, can you provide me a MySQL sentence in order to do that for all my previous posts in order to automate this task? (I have 923 posts)
Thanks
Done, thanks!
Phone: LG Nexus 4
Android version: 4.4.4 (latest)
Chrome for Android version: 37.0.2062.117 (latest)Thanks
Hi, thanks for your comments 🙂
What about the doubts?
Do you find it correct?
Can I improve it in anyway?For example, I’ve had to “hardcode” the appearance of the JetPack social sharing options with the sharing_display(); function, but I don’t know if there’s any kind of WordPress hook for that.
Thanks!
Hi again (after some time ago 🙂 ).
Finally I could workaround that.
I was willing to make that in order to use the Advanced Custom Fields plugin in order to make the baseball team roster. Now, you can see it here: http://beisbolsantboi.com/rosters/senior/
I’ve created a template with the following code:
<?php /* Template Name: Roster */ ?> <?php get_header(); ?> <?php $options = get_option('sf_dante_options'); $default_show_page_heading = $options['default_show_page_heading']; $default_page_heading_bg_alt = $options['default_page_heading_bg_alt']; $default_sidebar_config = $options['default_sidebar_config']; $default_left_sidebar = $options['default_left_sidebar']; $default_right_sidebar = $options['default_right_sidebar']; $pb_active = sf_get_post_meta($post->ID, '_spb_js_status', true); $show_page_title = sf_get_post_meta($post->ID, 'sf_page_title', true); $page_title_style = sf_get_post_meta($post->ID, 'sf_page_title_style', true); $page_title = sf_get_post_meta($post->ID, 'sf_page_title_one', true); $page_subtitle = sf_get_post_meta($post->ID, 'sf_page_subtitle', true); $page_title_bg = sf_get_post_meta($post->ID, 'sf_page_title_bg', true); $fancy_title_image = rwmb_meta('sf_page_title_image', 'type=image&size=full'); $page_title_text_style = sf_get_post_meta($post->ID, 'sf_page_title_text_style', true); $fancy_title_image_url = ""; if ($show_page_title == "") { $show_page_title = $default_show_page_heading; } if ($page_title_bg == "") { $page_title_bg = $default_page_heading_bg_alt; } if ($page_title == "") { $page_title = get_the_title(); } foreach ($fancy_title_image as $detail_image) { $fancy_title_image_url = $detail_image['url']; break; } if (!$fancy_title_image) { $fancy_title_image = get_post_thumbnail_id(); $fancy_title_image_url = wp_get_attachment_url( $fancy_title_image, 'full' ); } $sidebar_config = sf_get_post_meta($post->ID, 'sf_sidebar_config', true); $left_sidebar = sf_get_post_meta($post->ID, 'sf_left_sidebar', true); $right_sidebar = sf_get_post_meta($post->ID, 'sf_right_sidebar', true); if ($sidebar_config == "") { $sidebar_config = $default_sidebar_config; } if ($left_sidebar == "") { $left_sidebar = $default_left_sidebar; } if ($right_sidebar == "") { $right_sidebar = $default_right_sidebar; } sf_set_sidebar_global($sidebar_config); $page_wrap_class = ''; if ($sidebar_config == "left-sidebar") { $page_wrap_class = 'has-left-sidebar has-one-sidebar row'; } else if ($sidebar_config == "right-sidebar") { $page_wrap_class = 'has-right-sidebar has-one-sidebar row'; } else if ($sidebar_config == "both-sidebars") { $page_wrap_class = 'has-both-sidebars row'; } else { $page_wrap_class = 'has-no-sidebar'; } $remove_breadcrumbs = sf_get_post_meta($post->ID, 'sf_no_breadcrumbs', true); $remove_bottom_spacing = sf_get_post_meta($post->ID, 'sf_no_bottom_spacing', true); $remove_top_spacing = sf_get_post_meta($post->ID, 'sf_no_top_spacing', true); if ($remove_bottom_spacing) { $page_wrap_class .= ' no-bottom-spacing'; } if ($remove_top_spacing) { $page_wrap_class .= ' no-top-spacing'; } ?> <?php if ($show_page_title) { ?> <div class="container"> <div class="row"> <?php if ($page_title_style == "fancy") { ?> <?php if ($fancy_title_image_url != "") { ?> <div class="page-heading fancy-heading col-sm-12 clearfix alt-bg <?php echo $page_title_text_style; ?>-style fancy-image" style="background-image: url(<?php echo $fancy_title_image_url; ?>);"> <?php } else { ?> <div class="page-heading fancy-heading col-sm-12 clearfix alt-bg <?php echo $page_title_bg; ?>"> <?php } ?> <div class="heading-text"> <h1 class="entry-title"><?php echo $page_title; ?></h1> <?php if ($page_subtitle) { ?> <h3><?php echo $page_subtitle; ?></h3> <?php } ?> </div> </div> <?php } else { ?> <div class="page-heading col-sm-12 clearfix alt-bg <?php echo $page_title_bg; ?>"> <div class="heading-text"> <h1 class="entry-title"><?php echo $page_title; ?></h1> </div> <?php // BREADCRUMBS if (!$remove_breadcrumbs) { echo sf_breadcrumbs(); } ?> </div> <?php } ?> </div> </div> <?php } ?> <?php if ($sidebar_config != "no-sidebars" || $pb_active != "true") { ?> <div class="container"> <?php } ?> <div class="inner-page-wrap <?php echo $page_wrap_class; ?> clearfix"> <?php if (have_posts()) : the_post(); ?> <!-- OPEN page --> <?php if (($sidebar_config == "left-sidebar") || ($sidebar_config == "right-sidebar")) { ?> <div <?php post_class('clearfix col-sm-8'); ?> id="<?php the_ID(); ?>"> <?php } else if ($sidebar_config == "both-sidebars") { ?> <div <?php post_class('clearfix col-sm-9'); ?> id="<?php the_ID(); ?>"> <?php } else { ?> <div <?php post_class('clearfix'); ?> id="<?php the_ID(); ?>"> <?php } ?> <?php if ($sidebar_config == "both-sidebars") { ?> <div class="row"> <div class="page-content col-sm-8"> <?php the_content(); ?> <div class="link-pages"><?php wp_link_pages(); ?></div> <?php if ( comments_open() ) { ?> <div id="comment-area"> <?php comments_template('', true); ?> </div> <?php } ?> </div> <aside class="sidebar left-sidebar col-sm-4"> <?php dynamic_sidebar($left_sidebar); ?> </aside> </div> <?php } else { ?> <div class="page-content clearfix"> <?php $jugadores = get_field('jugadores'); if( $jugadores ) { ?> <table id="roster"> <thead> <tr> <th><strong>Foto</strong></th> <th><strong>Nombre</strong></th> <th><strong>Dorsal</strong></th> <th><strong>Fecha de nacimiento</strong></th> </tr> </thead> <tfoot> <tr> <td colspan='7'><strong>NĂşmero total de jugadores:</strong></td> <td><?php echo count( $jugadores ); ?></td> </tr> </tfoot> <tbody> <?php foreach( $jugadores as $jugador ) { $fecha_nacimiento = DateTime::createFromFormat( 'Ymd', $jugador['fecha_de_nacimiento'] ); echo "<tr>"; echo "<td>"; if (!empty($jugador['foto'])) { echo "<a href='" . $jugador['foto']['sizes']['large'] . "'><img alt='$jugador[nombre]' src='" . $jugador['foto']['sizes']['thumbnail'] . "' width='60' height='60' /></a>"; } echo "</td>"; echo "<td>$jugador[nombre]</td>"; echo "<td>$jugador[dorsal]</td>"; echo "<td>" . $fecha_nacimiento->format('d-m-Y') . "</td>"; echo "</tr>"; } ?> </tbody> </table> <?php } ?> <div class="link-pages"><?php wp_link_pages(); ?></div> <?php echo sharing_display(); ?> <?php if ( comments_open() ) { ?> <div id="comment-area"> <?php comments_template('', true); ?> </div> <?php } ?> </div> <?php } ?> <!-- CLOSE page --> </div> <?php endif; ?> <?php if ($sidebar_config == "left-sidebar") { ?> <aside class="sidebar left-sidebar col-sm-4"> <?php dynamic_sidebar($left_sidebar); ?> </aside> <?php } else if ($sidebar_config == "right-sidebar") { ?> <aside class="sidebar right-sidebar col-sm-4"> <?php dynamic_sidebar($right_sidebar); ?> </aside> <?php } else if ($sidebar_config == "both-sidebars") { ?> <aside class="sidebar right-sidebar col-sm-3"> <?php dynamic_sidebar($right_sidebar); ?> </aside> <?php } ?> <?php if ($sidebar_config != "no-sidebars" || $pb_active != "true") { ?> </div> <?php } ?> <!--// WordPress Hook //--> <?php get_footer(); ?>
Do you find it correct?
Can I improve it in anyway?For example, I’ve had to “hardcode” the apperance of the JetPack social sharing options with the sharing_display(); function, but I don’t know if there’s any kind of WordPress hook for that.
Thanks!
September 24, 2014 at 4:50 pm in reply to: Page Builder error – Uncaught TypeError: Cannot read property 'save' of null #114161It seems resolved by the moment.
I have enabled and disabled the option Users -> Your profile > Visual Editor
Thanks!
September 16, 2014 at 11:33 pm in reply to: Page Builder error – Uncaught TypeError: Cannot read property 'save' of null #111447This reply has been marked as private.September 16, 2014 at 11:21 pm in reply to: Page Builder error – Uncaught TypeError: Cannot read property 'save' of null #111439This reply has been marked as private.Ok…
One more question:
Is it possible to re-utilize the translations form the Neighborhood theme?I think that the template strings will not differ so much, what do you think?
-