• Hello

    I’m running the Agama theme on my wordpress site and I’d like to turn their Front Page boxes in to clickable links. Any clues on what coding to add and where to add it?

    Appreciate your help.

    Think this might be the first of many cried for help.

    TTFN!

Viewing 1 replies (of 1 total)
  • Thread Starter Mark.worksmart

    (@markworksmart)

    I have my home page code here and I want to add links to the icons in the front boxes – like an ahref.

    What to do?

    Thanks

    Andrew

    ‘<?php

    // Boxes enabled ? disabled
    $box_1_enable = get_theme_mod(‘agama_frontpage_box_1_enable’, true);
    $box_2_enable = get_theme_mod(‘agama_frontpage_box_2_enable’, true);
    $box_3_enable = get_theme_mod(‘agama_frontpage_box_3_enable’, true);
    $box_4_enable = get_theme_mod(‘agama_frontpage_box_4_enable’, true);

    // If Enabled – Render Boxes
    if( $box_1_enable || $box_2_enable || $box_3_enable || $box_4_enable ):

    $count = 0;

    if( $box_1_enable ) {
    $count++;
    }

    if( $box_2_enable ) {
    $count++;
    }

    if( $box_3_enable ) {
    $count++;
    }

    if( $box_4_enable ) {
    $count++;
    }

    switch( $count ) {
    case ‘1’:
    $bs_class = ‘col-md-12’;
    break;

    case ‘2’:
    $bs_class = ‘col-md-6’;
    break;

    case ‘3’:
    $bs_class = ‘col-md-4’;
    break;

    default: $bs_class = ‘col-md-3’;
    }

    // Boxes title
    $box_1_title = get_theme_mod(‘agama_frontpage_box_1_title’, ‘Register for Free’);
    $box_2_title = get_theme_mod(‘agama_frontpage_box_2_title’, ‘Go the the Members Area’);
    $box_3_title = get_theme_mod(‘agama_frontpage_box_3_title’, ‘How it works’);
    $box_4_title = get_theme_mod(‘agama_frontpage_box_4_title’, ‘Get in touch’);

    // Boxes FA Icon
    $box_1_icon = get_theme_mod(‘agama_frontpage_box_1_icon’, ‘fa-sign-in’);
    $box_2_icon = get_theme_mod(‘agama_frontpage_box_2_icon’, ‘fa-users’);
    $box_3_icon = get_theme_mod(‘agama_frontpage_box_3_icon’, ‘fa-cogs’);
    $box_4_icon = get_theme_mod(‘agama_frontpage_box_4_icon’, ‘fa-envelope’);

    // Boxes Image (instead of FA icon)
    $box_1_img = get_theme_mod(‘agama_frontpage_1_img’, ”);
    $box_2_img = get_theme_mod(‘agama_frontpage_2_img’, ”);
    $box_3_img = get_theme_mod(‘agama_frontpage_3_img’, ”);
    $box_4_img = get_theme_mod(‘agama_frontpage_4_img’, ”);

    // Boxes FA Icon Color
    $box_1_icon_color = get_theme_mod(‘agama_frontpage_box_1_icon_color’, ‘#f7a805’);
    $box_2_icon_color = get_theme_mod(‘agama_frontpage_box_2_icon_color’, ‘#f7a805’);
    $box_3_icon_color = get_theme_mod(‘agama_frontpage_box_3_icon_color’, ‘#f7a805’);
    $box_4_icon_color = get_theme_mod(‘agama_frontpage_box_4_icon_color’, ‘#f7a805’);

    // Boxes text
    $box_1_text = get_theme_mod(‘agama_frontpage_box_1_text’, ‘Register as a Freelancer or as an Employer to place a free Advert…. or both!’);
    $box_2_text = get_theme_mod(‘agama_frontpage_box_2_text’, ‘Log in and go directly to the members area to update your profile or add a job.’);
    $box_3_text = get_theme_mod(‘agama_frontpage_box_3_text’, ‘We will tell you why we are here and how it works.’);
    $box_4_text = get_theme_mod(‘agama_frontpage_box_4_text’, ‘Ask a question or give us some feedback.’); ?>

    <div id=”frontpage-boxes” class=”clearfix”>

    <?php if( $box_1_enable ): ?>
    <div class=”<?php echo esc_attr( $bs_class ); ?>”>

    <?php if( $box_1_img ): ?>
    <img src=”<?php echo esc_url( $box_1_img ); ?>”>
    <?php else: ?>
    <i class=”fa <?php echo esc_attr( $box_1_icon ); ?>” style=”color:<?php echo esc_attr( $box_1_icon_color ); ?>;”></i>
    <?php endif; ?>

    <h2><?php echo $box_1_title; ?></h2>
    <p><?php echo $box_1_text; ?></p>

    </div>
    <?php endif; ?>

    <?php if( $box_2_enable ): ?>
    <div class=”<?php echo esc_attr( $bs_class ); ?>”>

    <?php if( $box_2_img ): ?>
    <img src=”<?php echo esc_url( $box_2_img ); ?>”>
    <?php else: ?>
    <i class=”fa <?php echo esc_attr( $box_2_icon ); ?>” style=”color:<?php echo esc_attr( $box_2_icon_color ); ?>;”></i>
    <?php endif; ?>

    <h2><?php echo $box_2_title; ?></h2>
    <p><?php echo $box_2_text; ?></p>

    </div>
    <?php endif; ?>

    <?php if( $box_3_enable ): ?>
    <div class=”<?php echo esc_attr( $bs_class ); ?>”>

    <?php if( $box_3_img ): ?>
    <img src=”<?php echo esc_url( $box_3_img ); ?>”>
    <?php else: ?>
    <i class=”fa <?php echo esc_attr( $box_3_icon ); ?>” style=”color:<?php echo esc_attr( $box_3_icon_color ); ?>;”></i>
    <?php endif; ?>

    <h2><?php echo $box_3_title; ?></h2>
    <p><?php echo $box_3_text; ?></p>

    </div>
    <?php endif; ?>

    <?php if( $box_4_enable ): ?>
    <div class=”<?php echo esc_attr( $bs_class ); ?>”>

    <?php if( $box_4_img ): ?>
    <img src=”<?php echo esc_url( $box_4_img ); ?>”>
    <?php else: ?>
    <i class=”fa <?php echo esc_attr( $box_4_icon ); ?>” style=”color:<?php echo esc_attr( $box_4_icon_color ); ?>;”></i>
    <?php endif; ?>

    <h2><?php echo $box_4_title; ?></h2>
    <p><?php echo $box_4_text; ?></p>

    </div>
    <?php endif; ?>

    </div>

    <?php endif; ?>’

Viewing 1 replies (of 1 total)
  • The topic ‘Adding HTML links to Agama Front Page Boxes’ is closed to new replies.