Forum Replies Created
-
AuthorPosts
-
PaulaParticipant
seems to be functioning again
PaulaParticipantHello,
I read somewhere that if you were interested in an event on Fb their was a
possibility that it would import?I just realized that I can add other pages events to our facebook business
event tab ( here is how – https://www.facebook.com/help/802612399854497 )is their a way to import events from my own business page?
Paula
—
[image: Squamish Adventure | Grass Routes Agency]Paula de Jong
Prime Mover |* Squamish Adventure | Grass Routes Agency*
phone: 1-778-216-0249 javascript:void(0);
mobile: 604-848-8340 javascript:void(0);
Click to Book a Call
https://meetings.hubspot.com/squamishadventure/chat-with-me-
[image: facebook] https://www.facebook.com/SquamishAdventure/
[image: twitter] https://twitter.com/SquamishADVs
[image: instagram] https://www.instagram.com/squamishadventure/
[image: link] http://%20https//squamishadventure.com/Click Here to Grow Your Business With Us
http://squamishadventure.ontrapages.com/advertisePaulaParticipantIve added the code and then adjusted the settings in SEo Yoast to say this
for both options.Events & Festivals | Your #1 Event Calendar | Squamish Adventure
Explore the most comprehensive and complete local Squamish event calendar
to find upcoming events & festivals you don’t want to miss!Meta Robots
indexnoindex
Date in Snippet Preview
ShowHide
Yoast SEO Meta Box
ShowHide—
Web: Squamishadventure.com
Phone: 1-866-923-8747
Facebook: https://www.facebook.com/SquamishAdventure
Twitter: https://twitter.com/SquamishADVsPaulaParticipantHi Guys,
I was able to set this up, but the meta in search is still showing up as
Events ArchiveSee below – mine is Squamish Adventure
—
Web: Squamishadventure.com
Phone: 1-866-923-8747
Facebook: https://www.facebook.com/SquamishAdventure
Twitter: https://twitter.com/SquamishADVs*Free Mobile App Now Available to Download:
*October 25, 2016 at 11:18 am in reply to: Issue with php code to over write "Events Archive" #1182714PaulaParticipantHi Josh,
My developers replied the following:“Yes, the code is in the custom_functions.php file, but its not working for us at all. Where did he test the snippet out?
It was working before updates to the plugins (events calendar and yoast)”October 21, 2016 at 4:13 pm in reply to: Issue with php code to over write "Events Archive" #1181034PaulaParticipantI am also wondering how you implement a custom fix in the code to change the meta title?
Ex:
Squamish Events & Festivals – Squamish AdventureOctober 21, 2016 at 4:06 pm in reply to: Issue with php code to over write "Events Archive" #1181021PaulaParticipantThis is what my developers said:
We’ve updated the plugins on staging and the code supplied doesn’t work. We suspect something has changed with Yoast SEO and the override this code is meant to perform no longer works.
We can look at it more and rewrite it but it seems the best thing to do initially is get back to the Events calendar people and see if they can provide revised code.
October 21, 2016 at 4:03 pm in reply to: Issue with php code to over write "Events Archive" #1181019PaulaParticipant<?php
/** Start Engine */
require_once( get_template_directory().’/lib/init.php’ );
/* Add HTML5 markup structure */
add_theme_support( ‘html5’ );
/** Localization */
load_child_theme_textdomain( ‘prestige’, apply_filters( ‘child_theme_textdomain’, get_stylesheet_directory( ) . ‘/languages’, ‘prestige’ ) );
/** DO Not Remove */
define( ‘CHILD_THEME_NAME’, ‘Prestige’ );
define( ‘CHILD_THEME_URL’, ‘http://demo.zigzagpress.com/prestige/’ );
/** Custom Post Types */
require_once( get_stylesheet_directory( ) . ‘/include/cpt/super-cpt.php’ );
require_once( get_stylesheet_directory( ) . ‘/include/cpt/zp_cpt.php’ );
/** Theme Option/Functions */
require_once ( get_stylesheet_directory( ) . ‘/include/theme_settings.php’ );
require_once ( get_stylesheet_directory( ) . ‘/include/theme_functions.php’ );/** Theme Widgets */
require_once( get_stylesheet_directory( ) .’/include/widgets/widget-flickr.php’ );
require_once( get_stylesheet_directory( ) .’/include/widgets/widget-address.php’ );
require_once( get_stylesheet_directory( ) .’/include/widgets/widget-social_icons.php’ );
require_once( get_stylesheet_directory( ) .’/include/widgets/widget-latest_portfolio.php’ );
/** Theme Shortcode */
require_once( get_stylesheet_directory( ) . ‘/include/shortcodes/shortcode.php’ );
/** Unregister Layout */
genesis_unregister_layout( ‘content-sidebar-sidebar’ );
genesis_unregister_layout( ‘sidebar-sidebar-content’ );
genesis_unregister_layout( ‘sidebar-content-sidebar’ );
/** Unregister Sidebar */
unregister_sidebar( ‘header-right’ );
unregister_sidebar( ‘sidebar-alt’ );
/** Unregister secondary navigation menu */
add_theme_support( ‘genesis-menus’, array( ‘primary’ => __( ‘Primary Navigation Menu’, ‘prestige’ ) ) );
/** Add Structural Wraps */
add_theme_support( ‘genesis-structural-wraps’, array( ‘header’,’inner’, ‘footer-widgets’, ‘footer’ ) );
/** Reposition Primary Nav */
remove_action( ‘genesis_after_header’, ‘genesis_do_nav’ );
add_action( ‘genesis_header’, ‘genesis_do_nav’, 11 );
/** Remove Seondary Nav */
remove_action( ‘genesis_after_header’, ‘genesis_do_subnav’ );
/** Theme Stylesheets */
add_action( ‘wp_enqueue_scripts’, ‘zp_print_styles’ );
function zp_print_styles( ) {
wp_register_style( ‘pretty_photo_css’, get_stylesheet_directory_uri( ).’/css/prettyPhoto.css’, ”, ‘3.1.5’ );
wp_register_style( ‘flexslider-css’, get_stylesheet_directory_uri( ).’/css/flexslider.css’ , ”, ‘3.1.5’ );
wp_register_style( ‘shortcode-css’, get_stylesheet_directory_uri( ).’/include/shortcodes/shortcode.css’ , ”, ‘1.4’ );
wp_register_style( ‘mobile-css’, get_stylesheet_directory_uri( ).’/css/mobile.css’ ,”,’1.4′ );
wp_register_style( ‘boxed-css’, get_stylesheet_directory_uri( ).’/css/boxed.css’ ,” , ‘1.4’ );
wp_enqueue_style( ‘pretty_photo_css’ );
wp_enqueue_style( ‘flexslider-css’ );
wp_enqueue_style( ‘shortcode-css’ );$boxed_layout = genesis_get_option( ‘zp_boxed_layout’, ZP_SETTINGS_FIELD );
if( $boxed_layout ){
wp_enqueue_style( ‘boxed-css’ );
}
/** Custom Stylesheet */
$color = strtolower( genesis_get_option( ‘zp_color_scheme’ , ZP_SETTINGS_FIELD ) );
if( $color != ‘default’ ){
wp_enqueue_style( ‘color_scheme-css’, get_stylesheet_directory_uri( ).’/css/color/’.$color.’.css’ );
}wp_enqueue_style( ‘mobile-css’ );
wp_enqueue_style( ‘custom-css’, get_stylesheet_directory_uri( ).’/custom.css’ );
}
/** Shortcode Styles */
add_action( ‘admin_enqueue_scripts’, ‘zp_codes_admin_init’ );
function zp_codes_admin_init( ){
global $current_screen;
if( $current_screen->base == ‘post’ ){//enqueue the script and CSS files for the TinyMCE editor formatting buttons
wp_enqueue_script( ‘jquery’ );
wp_enqueue_script( ‘jquery-ui-dialog’ );
wp_enqueue_script( ‘jquery-ui-core’ );
wp_enqueue_script( ‘jquery-ui-sortable’ );
//set the style files
add_editor_style( ‘/include/shortcodes/shortcode.css’ );
wp_enqueue_style( ‘shortcode_editor_style’,get_stylesheet_directory_uri( ).’/include/shortcodes/shortcode_editor_style.css’ );
}
}
/** Theme Scripts */
add_action( ‘wp_enqueue_scripts’, ‘zp_theme_js’ );
function zp_theme_js( ) {
global $is_IE;wp_register_script( ‘jquery_custom’, get_stylesheet_directory_uri( ).’/js/jquery.custom.js’, array( ‘jquery’ ), ‘1.4’, true );
wp_register_script( ‘jquery_easing_js’, get_stylesheet_directory_uri( ) . ‘/js/jquery-easing.js’,array( ‘jquery’ ), ‘1.3’, true );
wp_register_script( ‘jquery_isotope_min_js’, get_stylesheet_directory_uri( ).’/js/jquery.isotope.min.js’,array( ‘jquery’ ), ‘1.5.04’, true );
wp_register_script( ‘jquery_flexslider_js’, get_stylesheet_directory_uri( ).’/js/jquery.flexslider.js’,array( ‘jquery’ ), ‘2.0’, true );
wp_register_script( ‘jquery_prettyphoto_js’, get_stylesheet_directory_uri( ) . ‘/js/jquery.prettyPhoto.js’,array( ‘jquery’ ),’3.1.6′, true );
wp_register_script( ‘jQuery_ScrollTo_min_js’, get_stylesheet_directory_uri( ) . ‘/js/jquery.ScrollTo.min.js’,array( ‘jquery’ ) , ‘1.4.3.1’, true );
wp_register_script( ‘jquery_tipTip’, get_stylesheet_directory_uri( ).’/js/jquery.tipTip.minified.js’,array( ‘jquery’ ), ‘1.3’, true );
wp_register_script( ‘jquery_cycle’, get_stylesheet_directory_uri( ) . ‘/js/jquery.cycle.lite.js’,array( ‘jquery’ ) , ‘1.7’, true );
wp_register_script( ‘jquery_carouFredSel’, get_stylesheet_directory_uri( ) . ‘/js/carousel/jquery.carouFredSel.min.js’, array( ‘jquery’ ), ‘6.2.1’ , true);
wp_register_script( ‘jquery_mousewheel’, get_stylesheet_directory_uri( ) . ‘/js/carousel/jquery.mousewheel.min.js’,array( ‘jquery’ ), ‘3.0.6’ , true );
wp_register_script( ‘jquery_touchswipe’, get_stylesheet_directory_uri( ) . ‘/js/carousel/jquery.touchSwipe.min.js’,array( ‘jquery’ ), ‘1.3.3’ , true);
wp_register_script( ‘jquery_transit’, get_stylesheet_directory_uri( ) . ‘/js/carousel/jquery.transit.min.js’,array( ‘jquery’ ), ‘0.9.9’ , true);
wp_register_script( ‘jquery_throttle’, get_stylesheet_directory_uri( ) . ‘/js/carousel/jquery.ba-throttle-debounce.min.js’, array( ‘jquery’ ), ‘1.1’ , true );
wp_register_script( ‘css3-mediaqueries’, get_stylesheet_directory_uri( ) . ‘/js/css3-mediaqueries.js’, ”, ‘1.1’ , true );
wp_enqueue_script( ‘jquery’ );
wp_enqueue_script( ‘jquery-ui-tabs’ );
wp_enqueue_script( ‘jquery_easing_js’ );
wp_enqueue_script( ‘jquery_isotope_min_js’ );
wp_enqueue_script( ‘jquery_prettyphoto_js’ );
wp_enqueue_script( ‘jQuery_ScrollTo_min_js’ );
wp_enqueue_script( ‘jquery_tipTip’ );
wp_enqueue_script( ‘jquery_custom’ );// Conditionally check if the browser is IE then enqueue the script
if ( $is_IE ){
wp_enqueue_script( ‘css3-mediaqueries’ );
}}
/** Custom CSS */
add_action( ‘wp_head’, ‘zp_custom_styles’ );
function zp_custom_styles( ) {
$css_custom = genesis_get_option( ‘zp_css_code’, ZP_SETTINGS_FIELD );
if( $css_custom ){
echo ‘<style type=”text/css”>’.$css_custom.'</style>’;
}
}
/** Enable Top Section */
add_action( ‘wp_head’, ‘zp_top_section_trigger’ );
function zp_top_section_trigger( ) {
$top_section = genesis_get_option( ‘zp_top_section’, ZP_SETTINGS_FIELD );
if( $top_section == true ){
echo ‘<style type=”text/css”>
.top .wrap{
display: block;
}
</style>’;
}else{
echo ‘<style type=”text/css”>
.top .wrap{
display: none;
}</style>’;
}
}add_action( ‘wp_head’, ‘zp_custom_logo’ );
function zp_custom_logo( ) {
//real estate page
if (is_page_template(‘page-real-estate.php’)) { ?>
<style type=”text/css”>
.header-image .site-header .title-area {
background-image: url( “<?php echo get_stylesheet_directory_uri() . ‘/images/real-estate-logo-website.png’; ?>” );
background-position: center center;
background-repeat: no-repeat;
}
</style>
<?php
}
else{
if ( genesis_get_option( ‘zp_logo’, ZP_SETTINGS_FIELD ) ) {?>
<style type=”text/css”>
.header-image .site-header .title-area {
background-image: url( “<?php echo genesis_get_option( ‘zp_logo’, ZP_SETTINGS_FIELD ); ?>” );
background-position: center center;
background-repeat: no-repeat;
height: <?php echo genesis_get_option( ‘zp_logo_height’, ZP_SETTINGS_FIELD ); ?>px;
width: <?php echo genesis_get_option( ‘zp_logo_width’, ZP_SETTINGS_FIELD ); ?>px;
}
</style>
<?php }
}
}
/** Enable Shortcode in the widget */
add_filter( ‘widget_text’, ‘do_shortcode’ );
/** Custom “Rread More” link */
add_filter( ‘excerpt_more’, ‘zp_read_more_link’ );
add_filter( ‘get_the_content_more_link’, ‘zp_read_more_link’ );
add_filter( ‘the_content_more_link’, ‘zp_read_more_link’ );
function zp_read_more_link( ) {
return ‘… ‘.__( ‘Read More’,’prestige’ ).’»‘;
}
/** Custom Post Meta */
add_filter( ‘genesis_post_meta’, ‘zp_post_meta_filter’ );
function zp_post_meta_filter( $post_meta ) {
$post_meta = ‘[post_categories sep=”, ” before=”<span>’.__( ‘Categories’,’prestige’ ).’: </span>”] [post_tags sep=”, ” before=”<span>’.__( ‘Tags’,’prestige’ ).’: </span>”]’;
return $post_meta;
}
/** Add page title wrapper */
add_filter( ‘genesis_after_header’,’zp_add_div’ );
function zp_add_div( ){global $post;
$img = ”;
if( ( !is_home( ) || !is_front_page() ) && !is_page_template( ‘homepage-template.php’ ) ){
if (is_page_template(‘page-real-estate.php’)) {
$img_url = get_stylesheet_directory_uri() . ‘/images/realestate_header_page_image.jpg’;
$style = ‘style=”background-image:url(‘ . $img_url . ‘); height:450px !important”‘;
}
else {
if (isset($post))
$img = get_post_meta($post->ID, ‘zp_page_image_value’, true);if ($img) {
$url = wp_get_attachment_image_src($img, ‘full’);
$img_url = $url[0];
} else {
$img_url = get_stylesheet_directory_uri() . ‘/images/default_header_page_image.jpg’;
}$style = ‘style=”background-image:url(‘ . $img_url . ‘)”‘;
}
echo ‘<div class=”page_title_wrap” ‘.$style.’>’;
}
}
/** Reposition Breadcrumbs*/
remove_action( ‘genesis_before_loop’, ‘genesis_do_breadcrumbs’ );
add_action( ‘genesis_before_content_sidebar_wrap’, ‘genesis_do_breadcrumbs’ );
/** Custom breadcrumbs arguments*/
add_filter( ‘genesis_breadcrumb_args’, ‘zp_breadcrumb_args’ );
function zp_breadcrumb_args( $args ) {
$args[‘sep’] = ‘ » ‘;
$args[‘list_sep’] = ‘, ‘; // Genesis 1.5 and later
$args[‘display’] = true;
$args[‘labels’][‘prefix’] = ”;
$args[‘labels’][‘author’] = __( ‘Archives for ‘,’prestige’ );
$args[‘labels’][‘category’] = __( ‘Archives for ‘,’prestige’ ); // Genesis 1.6 and later
$args[‘labels’][‘tag’] = __( ‘Archives for ‘,’prestige’ );
$args[‘labels’][‘date’] = __( ‘Archives for ‘,’prestige’ );
$args[‘labels’][‘search’] = __( ‘Search for ‘,’prestige’ );
$args[‘labels’][‘tax’] = __( ‘Archives for ‘,’prestige’ );
$args[‘labels’][‘post_type’] = __( ‘Archives for ‘,’prestige’ );
$args[‘labels’][‘404’] = __( ‘404’,’prestige’ ); // Genesis 1.5 and later
return $args;
}
/** Add Page Title */
add_filter( ‘genesis_after_header’,’zp_page_title’ );
function zp_page_title( ){
global $post;
$img=”;if( ( !is_home( ) || !is_front_page() ) && !is_page_template( ‘homepage-template.php’ ) ){
echo ‘<div class=”title_wrap”>’;
if ( is_category( ) ){
$category = get_the_category( $post->ID );
add_action( ‘genesis_entry_header’, ‘genesis_do_post_title’ );
echo ‘‘.__( ‘Archives for ‘, ‘prestige’ ).$category[0]->name.’
‘;
}
if( is_search( ) ){?><span><?php __( ‘Archives for ‘, ‘prestige’ ); ?>'<?php the_search_query( ) ?>'</span>
<?php }
if ( is_author( ) ){
$author = get_the_author_meta( ‘display_name’, $post->post_author );
add_action( ‘genesis_entry_header’, ‘genesis_do_post_title’ );
echo ‘‘.__( ‘Archives for ‘, ‘prestige’ ).$author.’
‘;
}
if ( is_tag( ) ){
add_action( ‘genesis_entry_header’, ‘genesis_do_post_title’ );
echo ‘‘.__( ‘Archives for ‘, ‘prestige’ ).single_tag_title( ”,FALSE ).’
‘;
}
if( is_post_type_archive( ‘portfolio’ ) ){
add_action( ‘genesis_entry_header’, ‘genesis_do_post_title’ );
$post_type_title=post_type_archive_title( ”,false );
echo ‘‘.__( ‘Archives for ‘, ‘prestige’ ).$post_type_title.’
‘;
}
if ( is_single( ) && !is_singular( ‘portfolio’ ) ){
echo ‘‘.the_title( ”,”,FALSE ).’
‘;
}
if( is_singular( ‘portfolio’ ) ){
add_action( ‘genesis_entry_header’, ‘genesis_do_post_title’ );
echo ‘‘.the_title( ”,”,FALSE ).’
‘;
}
if( is_tax( ‘portfolio_category’ ) ){
add_action( ‘genesis_entry_header’, ‘genesis_do_post_title’ );
echo ‘‘.__( ‘Archives for ‘, ‘prestige’ ).single_tag_title( ”,FALSE ).’
‘;
}
if( is_page_template( ‘page_blog.php’ ) ){
add_action( ‘genesis_entry_header’, ‘genesis_do_post_title’ );
echo ‘‘.the_title( ”,”,FALSE ).’
‘;
}
if( is_page( ) && !is_page_template( ‘page_blog.php’ ) ){
echo ‘‘.the_title( ”,”,FALSE ).’
‘;
}
if( is_404( ) ){
echo ‘‘.__( ‘404 – Page Not Found’, ‘prestige’ ).’
‘;
}
echo ‘</div>’;
}
}
/** Page Description */
add_action( ‘genesis_before_content_sidebar_wrap’, ‘zp_add_page_desc’ );
function zp_add_page_desc( ){
global $post;
$page_desc=”;if( isset( $post->ID ) )
$page_desc = get_post_meta( $post->ID, ‘zp_page_desc_value’, true );
if( $page_desc )
echo ‘<div class=”page_desc”>’.do_shortcode( $page_desc ) .'</div>’;
}
/** Close Page Title*/
add_filter( ‘genesis_after_header’,’zp_close_div’ );
function zp_close_div( ){
if( ( !is_home( ) || !is_front_page() ) && !is_page_template( ‘homepage-template.php’ ) )
echo ‘</div>’;
}
/** Remove Post Title */
add_action( ‘get_header’, ‘zp_remove_page_titles’ );
function zp_remove_page_titles( ) {
if ( ( is_page( ) || is_404( ) || is_single( ) ) && !is_page_template( ‘blog-template.php’ ) ) {
remove_action( ‘genesis_entry_header’, ‘genesis_do_post_title’ );
}
}
/** Top Widget Area */
add_action( ‘genesis_before_header’, ‘zp_above_header_ad’ );
function zp_above_header_ad( ) {
if( is_active_sidebar( ‘Top’ ) ): ?>
<div class=”top_container”>
<div class=”top”>
<div class=”wrap”>
<?php dynamic_sidebar( ‘Top’ ); ?>
</div>
<div class=”top_trigger open”></div>
</div><!– end –>
</div>
<?php endif;
}
/** Background Support */
add_theme_support( ‘custom-background’ );
/** Custom Background Pattern*/
add_action( ‘wp_head’, ‘zp_custom_background_pattern’ );
function zp_custom_background_pattern( ) {
$pattern = genesis_get_option( ‘zp_background_pattern’, ZP_SETTINGS_FIELD );
if( $pattern ){
echo ‘<style type=”text/css”>
body {
background-image: url( ‘.get_stylesheet_directory_uri( ).’/images/pattern/’.$pattern.’.png ) !important;
background-repeat: repeat !important;
background-position: center top !important;
}
</style>’;
}
}
/** Meta for Mobile */
add_action( ‘wp_head’,’zp_for_mobile’ );
function zp_for_mobile( ){
echo ‘<meta name=”viewport” content=”width=device-width, initial-scale=1, maximum-scale=1″ />’.”\n”;
}
/** To Top Link */
add_action( ‘genesis_before_footer’,’zp_add_top_link’ );
function zp_add_top_link( ){
echo ‘ ↑ ‘. __( ‘Top of Page’,’prestige’ ) .’‘;
}
/** Footer Area */
remove_action( ‘genesis_footer’, ‘genesis_do_footer’ );
add_action( ‘genesis_footer’, ‘zp_do_custom_footer’ );
function zp_do_custom_footer( ) {
$copyright = genesis_get_option( ‘zp_footer_text’, ZP_SETTINGS_FIELD );?>
<div class=”creds”>©
<?php echo date( “Y” ); ?>
<?php
if( $copyright ){
echo $copyright ;
}else{
bloginfo( ‘name’ ); ?> :: <?php bloginfo( ‘description’ );
}?>
</div><?php if(is_active_sidebar( ‘bottom-widget’ ) ):?>
<div class=”bottom-widget”>
<div class=”widget”>
<?php dynamic_sidebar( ‘bottom-widget’ ); ?>
</div>
</div><!– end –>
<?php endif;?>
<?php }
/**
* Blog Page
**//** Remove the post info function */
remove_action( ‘genesis_entry_header’, ‘genesis_post_info’, 12 );
remove_action( ‘genesis_entry_footer’, ‘genesis_post_meta’ );
/** Add Post info Block */
add_action( ‘genesis_entry_header’, ‘zp_add_post_block’, 1 );
function zp_add_post_block( ){
if ( is_page( ) || ! genesis_get_option( ‘content_archive_thumbnail’ ) )
return;
echo ‘<div class=”post_block” class=”clearfix”>’;
}
/** Custom Post Info */
add_filter( ‘genesis_post_info’, ‘zp_post_info_filter’ );
function zp_post_info_filter( $post_info ) {
if ( !is_page( ) ) {
$post_info = ‘[post_author_posts_link before=”<span>’.__( ‘Author’,’prestige’ ).’:</span>” ] [post_comments before=”<span>’.__( ‘Comment( s )’,’prestige’).’:</span>”]’;
return $post_info;
}}
/** Reposition Post Info */
add_action( ‘genesis_entry_header’, ‘genesis_post_info’,2 );
/** Reposition Post Meta */
add_action( ‘genesis_entry_header’, ‘genesis_post_meta’,3 );
/** Add close post block <div> */
add_action( ‘genesis_entry_header’, ‘zp_add_post_block_close’,4 );
function zp_add_post_block_close( ){
if ( is_page( ) || ! genesis_get_option( ‘content_archive_thumbnail’ ) )
return;echo ‘</div>’;
printf( ‘<div class=”post_content” class=”clearfix”>’ );
}
/** Post above Post Title */
remove_action( ‘genesis_entry_content’, ‘genesis_do_post_image’, 8 );
add_action( ‘genesis_entry_header’, ‘zp_generate_post_image’, 8 );
function zp_generate_post_image( ) {
if ( is_page( ) || !genesis_get_option( ‘content_archive_thumbnail’ ) )
return;
if ( ($image = genesis_get_image( array( ‘format’ => ‘url’, ‘size’ => genesis_get_option( ‘image_size’ ) ) ) ) && !is_single() ) {
printf( ‘‘, get_permalink( ), $image );
}
}
/** Post date After Post Title*/
add_action( ‘genesis_entry_content’, ‘zp_add_post_date’, 1 );
function zp_add_post_date( ){
if ( is_page( ) || ! genesis_get_option( ‘content_archive_thumbnail’ ) )
return;
if( !is_single() )
echo do_shortcode( ‘[post_date format=”F j, Y” label=””]’);
}
/** Add close post content </div> */
add_action( ‘genesis_entry_footer’, ‘zp_add_post_content_close’, 11 );
function zp_add_post_content_close(){
if ( is_page( ) || ! genesis_get_option( ‘content_archive_thumbnail’ ) )
return;echo ‘</div>’;
}
/** Widgets */
genesis_register_sidebar( array(
‘name’=>’Top’,
‘id’ => ‘top’,
‘description’ => __( ‘This is the topmost section of the homepage.’,’prestige’ ),
‘before_widget’ => ‘<div id=”%1$s” class=”widget %2$s”>’, ‘after_widget’ => ‘</div>’,
‘before_title’=>'<div class=”section-title”> <span>’,’after_title’=>'</span></div>’
) );
genesis_register_sidebar( array(
‘name’=>’Home Widget’,
‘id’ => ‘home-widget’,
‘description’ => __( ‘This is the widget section of the homepage. This widget applies only to default homepage and not to Home Page Template’,’prestige’ ),
‘before_widget’ => ‘<div id=”%1$s” class=”widget %2$s”>’, ‘after_widget’ => ‘</div>’,
‘before_title’=>'<div class=”section-title”> <span>’,’after_title’=>'</span></div>’
) );genesis_register_sidebar( array(
‘name’=>’Bottom Widget’,
‘id’ => ‘bottom-widget’,
‘description’ => __( ‘This is the widget area at the bottom of the page right of footer credits.’,’prestige’ ),
‘before_widget’ => ‘<div id=”%1$s” class=”widget %2$s”>’, ‘after_widget’ => ‘</div>’,
‘before_title’=>'<div class=”section-title”> <span>’,’after_title’=>'</span></div>’
) );
/** Footer Widget */
add_theme_support( ‘genesis-footer-widgets’, 4 );/** Add widget title container */
add_filter( ‘widget_title’, ‘zp_widget_title’ );
function zp_widget_title( $title ){
if( $title )
return sprintf( ‘<span class=”widget-line”>%s</span>’, $title );
}
/** Include created image sizes in the WP media */
add_filter( ‘image_size_names_choose’, ‘zp_custom_image_sizes’ );
function zp_custom_image_sizes( $sizes ) {
return array_merge( $sizes,
array(
‘portfolio_single’ => __(‘Portfolio Single’, ‘prestige’ ),
)
);
}
/*
* Add menu item description
*
* credits: Travis Smith
* url: http://wpsmith.net/2011/tutorials/how-to-add-menu-descriptions-featured-images-to-wordpress-menu-items/
*
**/
class Menu_With_Description extends Walker_Nav_Menu {
function start_el(&$output, $item, $depth, $args, $id = 0) {
global $wp_query;
$class_names = $value = ”;$classes = empty( $item->classes ) ? array() : (array) $item->classes;
$class_names = join( ‘ ‘, apply_filters( ‘nav_menu_css_class’, array_filter( $classes ), $item ) );
$class_names = ‘ class=”‘ . esc_attr( $class_names ) . ‘”‘;$output .= ‘<li id=”menu-item-‘. $item->ID . ‘”‘ . $value . $class_names .’>’;
$attributes = ! empty( $item->attr_title ) ? ‘ title=”‘ . esc_attr( $item->attr_title ) .'”‘ : ”;
$attributes .= ! empty( $item->target ) ? ‘ target=”‘ . esc_attr( $item->target ) .'”‘ : ”;
$attributes .= ! empty( $item->xfn ) ? ‘ rel=”‘ . esc_attr( $item->xfn ) .'”‘ : ”;
$attributes .= ! empty( $item->url ) ? ‘ href=”‘ . esc_attr( $item->url ) .'”‘ : ”;// get user defined attributes for thumbnail images
$attr_defaults = array( ‘class’ => ‘nav_thumb’ , ‘alt’ => esc_attr( $item->attr_title ) , ‘title’ => esc_attr( $item->attr_title ) );
$attr = isset( $args->thumbnail_attr ) ? $args->thumbnail_attr : ”;
$attr = wp_parse_args( $attr , $attr_defaults );$item_output = $args->before;
// menu link output
$item_output .= ‘<a’. $attributes .’>’;
$item_output .= $args->link_before . apply_filters( ‘the_title’, $item->title, $item->ID ) . $args->link_after;// close menu link anchor
$item_output .= ‘‘;
// menu description output based on depthif( !empty( $item->description ) )
$item_output .= ( $args->desc_depth >= $depth ) ? ‘<span class=”sub”>’ . $item->description . ‘</span>’ : ”;$item_output .= $args->after;
$output .= apply_filters( ‘walker_nav_menu_start_el’, $item_output, $item, $depth, $args, $id );
}
}
add_filter( ‘wp_nav_menu_args’ , ‘zp_add_menu_descriptions’ );
function zp_add_menu_descriptions( $args ) {
if ( $args[‘theme_location’] == ‘primary’ ) {
//mintstone – switch to real estate menu if its a real estate page
if(is_page_template(‘page-real-estate.php’)) {
$args[‘menu’] = ‘real-estate-hub’;
}
$args[‘walker’] = new Menu_With_Description;
$args[‘desc_depth’] = 0;
$args[‘thumbnail’] = false;
}
return $args;
}
// Add mobile menu
add_action( ‘genesis_header’, ‘zp_mobile_nav’, 10 );
function zp_mobile_nav(){
$output = ”;$output .= ‘<div class=”mobile_menu” role=”navigation”>’;
$output .= ‘<span class=”icon-bar”></span><span class=”icon-bar”></span><span class=”icon-bar”></span>’;
$output .= ‘</div>’;echo $output;
}
/* Add support for IE8 */
add_action( ‘wp_head’, ‘zp_add_IE8_fixes’ );
function zp_add_IE8_fixes(){
echo ‘<!–[if IE 8]>
<link rel=”stylesheet” type=”text/css” href=”‘.get_stylesheet_directory_uri( ).’/css/ie8.css”>
<![endif]–>’.”\n”;
}
/**
* Include Custom Theme Function
*
* Write all your custom functions in this file
*/require_once ( get_stylesheet_directory( ) . ‘/include/custom_functions.php’ );
October 21, 2016 at 4:00 pm in reply to: Issue with php code to over write "Events Archive" #1181017PaulaParticipantHI – I cant seem to upload to that site
we are just trying to implement the code from here https://theeventscalendar.com/knowledgebase/titles-in-yoast-seo/
but it is getting over written by SEO yoast
We updated all plug ins but are still having trouble.
Paula
-
AuthorPosts