Skip to content

Instantly share code, notes, and snippets.

@farookibrahim
farookibrahim / functions.php
Last active October 14, 2015 06:33
Change Ministries Labels in Bethlehem
function custom_ministries_post_type_labels() {
$labels = array(
'name' => _x('Ministries', 'post type general name', 'bethlehem'),
'singular_name' => _x('Ministry', 'post type singular name', 'bethlehem'),
'add_new' => _x('Add New', 'block', 'bethlehem'),
'add_new_item' => __('Add New', 'bethlehem'),
'edit_item' => __('Edit', 'bethlehem'),
'new_item' => __('New', 'bethlehem'),
'all_items' => __('All Ministries', 'bethlehem'),
@farookibrahim
farookibrahim / functions.php
Created October 22, 2015 05:34
Sportexx Search Block Text Change
if( ! function_exists( 'sportexx_navbar_right_search' ) ) {
/**
* Displays Search Form
* @since 1.0
* @return void
*/
function sportexx_navbar_right_search() {
?>
<form role="search" class="form-search clearfix" action="<?php echo esc_url( home_url( '/' ) ); ?>">
<div class="input-group input-search-group">
@farookibrahim
farookibrahim / functions.php
Last active October 28, 2015 07:51
Add Currency Symbol for Give Plugin
add_filter( 'give_currencies', 'give_custom_currencies' );
function give_custom_currencies( $currencies ) {
$currencies['NGN'] = __( 'Nigerian Naira (&#8358;)', 'bethlehem' );
return $currencies;
}
add_filter( 'give_currency_symbol', 'give_custom_currency_symbol', 10, 2 );
@farookibrahim
farookibrahim / functions.php
Created November 4, 2015 06:36
Custom Footer Logo for Bethlehem
if ( ! function_exists( 'bethlehem_footer_logo' ) ) {
function bethlehem_footer_logo() {
$site_logo = '<img src="" class="img-responsive" alt="logo"/>';
echo sprintf( '<div class="footer-logo"><div class="site-branding"><a href="%s" rel="home">%s</a></div></div>', esc_url( home_url( '/' ) ), $site_logo );
}
}
@farookibrahim
farookibrahim / functions.php
Created November 5, 2015 05:34
Remove Breadcrumb in Bethlehem
if ( ! function_exists( 'bethlehem_header_content' ) ) {
function bethlehem_header_content() {
global $bethlehem_page_metabox;
if( ! is_page_template( array( 'template-homepage.php', 'template-homepage-v2.php' ) ) ) {
if( is_page() && method_exists( $bethlehem_page_metabox, 'get_the_value' ) ) {
$static_block_ID = $bethlehem_page_metabox->get_the_value( 'header_content_static_block_ID' );
if( !empty( $static_block_ID ) && $static_block_ID != 0 ) {
$content = bethlehem_get_the_content_by_id( $static_block_ID );
@farookibrahim
farookibrahim / functions.php
Created December 1, 2015 07:28
Change Header Nav Links and Text
if ( ! function_exists( 'bethlehem_navigation_links' ) ) {
function bethlehem_navigation_links() {
$header = bethlehem_get_header();
?>
<div class="top-nav-links">
<?php if( apply_filters( 'bethlehem_header_navbar_links', true ) && $header == 'header-7' ) : ?>
<ul>
<?php if( apply_filters( 'bethlehem_navbar_events_link', true ) ) : ?>
<li class="events-link">
<a href="<?php echo esc_url( tribe_get_events_link() ); ?>"><i class="fa fa-calendar"></i><?php echo apply_filters( 'bethlehem_navbar_sermon_link_text', __( 'Calendar', 'bethlehem' ) ); ?></a>
@farookibrahim
farookibrahim / functions.php
Created December 10, 2015 13:03
Add custom scripts in child theme
function my_scripts_method() {
wp_enqueue_script( 'custom-scripts', get_stylesheet_directory_uri() . 'scripts.js' );
}
add_action('wp_enqueue_scripts', 'my_scripts_method');
// Add scripts.js file in your child theme and add your custom js code
@farookibrahim
farookibrahim / functions.php
Last active February 1, 2016 06:15
Bethlehem Donate Now Button Text Change
add_filter( 'bethlehem_navbar_donation_link_text', 'custom_navbar_donation_link_text' );
function custom_navbar_donation_link_text() {
return esc_html__( 'Text', 'bethlehem' );
}
@farookibrahim
farookibrahim / custom-color.scss
Created December 15, 2015 05:30
Variables for MediaCenter to generate Custom Color
//== Media queries breakpoints
//
//## Define the breakpoints at which your layout will change, adapting to different screen sizes.
// Extra small screen / phone
// Note: Deprecated $screen-xs and $screen-phone as of v3.0.1
$screen-xs: 480px;
$screen-xs-min: $screen-xs;
$screen-phone: $screen-xs-min;
@farookibrahim
farookibrahim / functions.php
Created January 27, 2016 06:46
Remove Post Navigation in Bethlehem
add_action( 'init', 'bethlehem_child_init', 10 );
function bethlehem_child_init() {
remove_action( 'bethlehem_single_post_after', 'bethlehem_post_nav', 10 );
}