david221
Forum Replies Created
-
I changed the code, but it hides my entire footer instead.
Thanks for your reply.
I’ve written the code in my functions.php file, so a link appears in the home page’s footer area. This is what I’ve done so far.
if ( !function_exists( 'skeleton_footer_credits' ) ) { function skeleton_footer_credits() { $footer_extras = skeleton_options('footer_extras'); $extras .= '<blockquote><a href="#newsletter-pop" class="fancybox">Receive our newsletter</a>'; $extras .= '<div style="display:none;" class="fancybox-hidden">'; [B]$extras .= '<div id="newsletter-pop">[gravityform id="1" name="Newsletter"]</div>';[/B] $extras .= '</div></blockquote>'; echo apply_filters('skeleton_author_credits',$extras); } add_action('skeleton_footer', 'skeleton_footer_credits',4); }
The code isn’t working properly because the php file doesn’t seem to accept the code I’ve bolded.
Would you know what I should do?
Forum: Fixing WordPress
In reply to: How to add a LinkedIn icon in the header?Forget it, I solved it! This is how (I should mention that I’m using Skeleton Theme):
/*———————————————————————————–*/
/* Navigation Hook (skeleton_navbar)
/*———————————————————————————–*/if ( !function_exists( ‘skeleton_main_menu’ ) ) {
function skeleton_main_menu() {
echo ‘<div id=”navigation” class=”row sixteen columns”>’;
wp_nav_menu( array( ‘container_class’ => ‘menu-header’, ‘theme_location’ => ‘primary’));
echo ‘<div class=”linkedin-header”><script src=”//platform.linkedin.com/in.js” type=”text/javascript”>lang: en_US</script><script type=”IN/FollowCompany” data-id=”98787″ data-counter=”top”></script></div>’;
echo ‘</div><!–/#navigation–>’;
echo ‘</div><!–/.maxwidth–>’;
}add_action(‘skeleton_navbar’,’skeleton_main_menu’, 1);
}
Forum: Plugins
In reply to: [Recent Posts Plus] How to show author's posts in Recent Posts Plus?Thanks, I just worked it out! ??
Forum: Themes and Templates
In reply to: How to create a News index?I solved it!
I copied the loop.php file from my original theme folder and put it into my child theme folder. I added these lines of code to get the information I wanted to display on the news index:
<?php /* How to display all other posts. */ ?>
<?php else : ?>
<div id=”post-<?php the_ID(); ?>” <?php post_class(); ?>>
<!– embeds the link of the post together with the article’s title –>
<h2 class=”entry-title”>” title=”<?php printf( esc_attr__( ‘Permalink to %s’, ‘smpl’ ), the_title_attribute( ‘echo=0’ ) ); ?>” rel=”bookmark”><?php the_title(); ?></h2>
<!– added the date of when the article is published, in this case month and year–>
<div class=”date”><?php the_time(‘F, Y’) ?></div>
<!– below is a link that takes you to the article once it’s clicked –>
<span class=”meta-nav”>“>Read more</span>
<?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?>Thanks… :/
Forum: Plugins
In reply to: How do I make a full width Meta Slider fit across the home page?I worked it out:
/*———————————————————————————–*/
// Opening #header
/*———————————————————————————–*/if ( !function_exists( ‘skeleton_header_open’ ) ) {
function skeleton_header_open() {
if( is_front_page() ) {
echo do_shortcode( ‘[metaslider id=”21″]’ );
}
echo “<div id=\”header\” class=\”sixteen columns\”>\n<div class=\”inner\”>\n<div class=\”container\”>\n”;
}
add_action(‘skeleton_header’,’skeleton_header_open’, 2);}
Forum: Plugins
In reply to: How do I make a full width Meta Slider fit across the home page?I got it half working. This is what I’ve added in my functions.php page:
/*———————————————————————————–*/
// Opening #header
/*———————————————————————————–*/if ( !function_exists( ‘skeleton_header_open’ ) ) {
function skeleton_header_open() {
echo “<div id=\”wrap\” class=\”container\”>”;
echo do_shortcode(“[metaslider id=21 percentwidth=100 restrict_to=home]”);
echo “<div id=\”header\” class=\”sixteen columns\”>\n<div class=\”inner\”>\n”;
}
add_action(‘skeleton_header’,’skeleton_header_open’, 2);}
It’s slightly bigger than usual, but it’s still not at 100%.
Forum: Themes and Templates
In reply to: How to embed Museo Sans font in WordPress?Actually, I figured it out. I made the mistake of writing (‘../fonts/ instead of (‘fonts/. e.g:
@font-face {
font-family: ‘museo_sans500’;
src: url(‘fonts/museosans-500-webfont.eot’);
src: url(‘fonts/museosans-500-webfont.eot?#iefix’) format(’embedded-opentype’),
url(‘fonts/museosans-500-webfont.woff2’) format(‘woff2’),
url(‘fonts/museosans-500-webfont.woff’) format(‘woff’),
url(‘fonts/museosans-500-webfont.ttf’) format(‘truetype’),
url(‘fonts/museosans-500-webfont.svg#museo_sans500’) format(‘svg’);
font-weight: normal;
font-style: normal;
}Forum: Themes and Templates
In reply to: Skeleton Theme Layout Hook Tutorials?Hi Voodoogrrl,
I have worked out my problem. I went to Customize > Appearances and set my website to be 1200px wide under the Layout section, and set the number of columns to sixteen i.e. sidebar width = 5 columns and content width = 11.
I had no idea how to organize my web page correctly until I realized that I had to set the number of columns to sixteen in the functions.php if the content is equal to a single page.
//
if ( !function_exists( ‘st_before_content’ ) ) {
global $post;
function st_before_content($columns) {//Sets container up to sixteen columns for all web pages
if (is_page() && !is_active_sidebar(‘secondary-widget-area’)) {
$columns = ‘sixteen’;
}
}
}I hope that helps. ??
Forum: Themes and Templates
In reply to: How to change number of columns in a post?I worked it out! All I had to do is go to the functions.php page and set the number of columns to eleven if content is equal to single post.
if ( !function_exists( ‘st_before_content’ ) ) {
global $post;
function st_before_content($columns) {//Sets container up to eleven columns for all blog entries
if (is_single() && !is_active_sidebar(‘primary-widget-area’)) {
$columns = ‘eleven’;
}
}
}Thanks…:/
Forum: Themes and Templates
In reply to: How to change number of columns in a post?At the moment, I’ve done this in my CSS to get what I want.
.post.single p { width: 760px; margin-bottom: 20px; }
But I don’t believe this is the right way to do it.
Forum: Fixing WordPress
In reply to: do_shortcode isn't not working for Responsive Styled Google MapThank you for letting me know. I’ll check out that link right now.
Forum: Themes and Templates
In reply to: How to add a map at the bottom of the page?I’ve made a bit of progress. I created a sidebar-footer PHP file and organized the code by adding “googleMap” as a div id element to make space
that is stretches across the screen.The only problem is my map won’t appear. :/
<?php /** * Footer widget areas. * * @package WordPress * @subpackage skeleton * @since skeleton 0.1 */ // count the active widgets to determine column sizes $footerwidgets = is_active_sidebar('footer-widget-area-1') + is_active_sidebar('footer-widget-area-2') + is_active_sidebar('footer-widget-area-3') + is_active_sidebar('footer-widget-area-4'); // default $footergrid = "one_fourth"; // if only one if ($footerwidgets == "1") { $footergrid = "googleMap"; // if two, split in half } elseif ($footerwidgets == "2") { $footergrid = "one_half"; // if three, divide in thirds } elseif ($footerwidgets == "3") { $footergrid = "one_third"; // if four, split in fourths } elseif ($footerwidgets == "4") { $footergrid = "one_fourth"; } ?> <?php if ($footerwidgets) : ?> <?php if (is_active_sidebar('footer-widget-area-1')) : ?> <div class="<?php echo $footergrid;?>"> <?php dynamic_sidebar('footer-widget-area-1'); ?> </div> <?php endif;?> <?php if (is_active_sidebar('footer-widget-area-2')) : $last = ($footerwidgets == '2' ? ' last' : false);?> <div class="<?php echo $footergrid.$last;?>"> <?php dynamic_sidebar('footer-widget-area-2'); ?> </div> <?php endif;?> <?php if (is_active_sidebar('footer-widget-area-3')) : $last = ($footerwidgets == '3' ? ' last' : false);?> <div class="<?php echo $footergrid.$last;?> last"> <?php dynamic_sidebar('footer-widget-area-3'); ?> </div> <?php endif;?> <div class="clear"></div> </div> </div> <?php if (is_active_sidebar('footer-widget-area-4')) : $last = ($footerwidgets == '4' ? ' last' : false);?> <div class="full-width"> <?php dynamic_sidebar('footer-widget-area-4'); ?> </div> <?php endif;?> <div class="sixteen columns container"> <?php endif;?>
Forum: Plugins
In reply to: Multiple Content Blocks not showing upI figured it out.
The blocks had to be referred to a template page. For example:
get_header();
st_before_content($columns=”);
get_template_part( ‘loop’, ‘page’ );
st_after_content();get_the_block(‘Block Name’);
?><div class=”pageStretch” id=”company”>
<div class=”container sixteen columns”>
<?php the_block(‘Block Name’); ?>
</div>
</div>I also had to careful refer to the hook commands to make the content blocks appear on the editing page.
Thank…;/
Forum: Plugins
In reply to: Multiple Content Blocks not showing upI just found out the blocks are inactive. I went to Settings > Multiple content blocks and clicked ‘Show inactive blocks’, and the content is there, but I can’t activate them?
Thoughts?