Forum Replies Created

Viewing 15 posts - 16 through 30 (of 35 total)
  • Posted in:
  • in reply to: Disable theme post sharing options #114831
    JavierCane
    Member
    Post count: 45

    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 🙂

    in reply to: Do not show the post highlighted image as the post header #114820
    JavierCane
    Member
    Post count: 45

    Hi,

    What about the posts formats?
    Don’t you support them?

    Thanks!

    in reply to: Links highlight on blog posts and pages content #114819
    JavierCane
    Member
    Post count: 45

    Hi Mohammad,

    Your CSS work out for posts content, but it doesn’t work for pages.

    You can see it here:

    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 🙂

    in reply to: Mobile header background color #114816
    JavierCane
    Member
    Post count: 45

    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?

    in reply to: Mobile header background color #114793
    JavierCane
    Member
    Post count: 45

    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.
    in reply to: Links highlight on blog posts and pages content #114790
    JavierCane
    Member
    Post count: 45

    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

    in reply to: Disable theme post sharing options #114789
    JavierCane
    Member
    Post count: 45

    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

    in reply to: Single page templates #114786
    JavierCane
    Member
    Post count: 45

    Done, thanks!

    in reply to: Last blog posts not clickable on mobile #114785
    JavierCane
    Member
    Post count: 45

    Phone: LG Nexus 4
    Android version: 4.4.4 (latest)
    Chrome for Android version: 37.0.2062.117 (latest)

    Thanks

    in reply to: Single page templates #114320
    JavierCane
    Member
    Post count: 45

    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!

    in reply to: Single page templates #114183
    JavierCane
    Member
    Post count: 45

    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!

    JavierCane
    Member
    Post count: 45

    It seems resolved by the moment.

    I have enabled and disabled the option Users -> Your profile > Visual Editor

    Thanks!

    JavierCane
    Member
    Post count: 45
    This reply has been marked as private.
    JavierCane
    Member
    Post count: 45
    This reply has been marked as private.
    in reply to: Spanish translation (es_ES) #50644
    JavierCane
    Member
    Post count: 45

    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?

Viewing 15 posts - 16 through 30 (of 35 total)