Forum Replies Created

Viewing 15 replies - 1 through 15 (of 29 total)
  • Forum: Plugins
    In reply to: [Menu] Menu Will Not Update

    HI I am having this issue also of the menu wiping the original custom menu when I updated my custom menu and now it will not save any new additions, I deactivated all plugins and still not working. I have done no updates so unsure why this has broken. still running WP 3.4.2 (unsure to update as do not want to find things breaking)
    Running a child theme on genesis.

    If you can shed any light on this I would be pleased. Thanks

    I am having this issue 2 but I would like to continue with the plugin.

    Is there a hack/ fix to remove sticky posts from paged archives?

    Thread Starter bleggate

    (@bleggate)

    Thanks
    you got my brain ticking and what I did was use the pull certain categories in the functions.php

    function child_before_loop () {
    global $query_string;

    if( is_home() )
    query_posts($query_string . “&cat=10”);
    }

    add_action(‘genesis_before_loop’, ‘child_before_loop’);

    add_filter( ‘genesis_seo_title’, ‘child_header_title’, 10, 3 );

    then use Genesis simple hooks, and put in some content before the geneisis-before-loop hook to create what I wanted. Not pulling the page I wanted but linking to it which is what I wanted. see here

    <?php if(is_home( ) )
    {
    ?><p>insert images and text and any links you want here</p> <?php
    }
    ?>

    Thanks for your help

    Sorry an update on this, follow the `code changes below ??

    Look for xml-news-metabox.php and replace entire file with the following code, I changed how script checks for posts that are checked in the settings and displays nothing if its not included.

    —————-

    <?php

    /**
    * This code handles the display of the Google news tab in the WP SEO metabox.
    */
    class WPSEO_XML_News_Sitemap_Metabox extends WPSEO_Metabox {

    /**
    * Options array
    */
    private $options = array();

    /**
    * Class constructor
    */
    public function __construct() {
    $this->options = get_option( ‘wpseo_news’ );
    add_filter( ‘wpseo_save_metaboxes’, array( &$this, ‘save_meta_boxes’ ), 10, 1 );
    add_action( ‘wpseo_tab_header’, array( &$this, ‘tab_header’ ) );
    add_action( ‘wpseo_tab_content’, array( &$this, ‘tab_content’ ) );
    }

    /**
    * Ping Google about the update of this sitemap
    */
    public function ping() {
    // Ping Google. Just do it. Not optional because if you don’t want to ping Google you don’t need no freaking news sitemap.
    wp_remote_get( ‘https://www.google.com/webmasters/tools/ping?sitemap=&#8217; . home_url( ‘news-sitemap.xml’ ) );
    }

    /**
    * Make sure the parent class knows which meta_boxes content to save.
    *
    * @param array $mbs meta boxes that need to be saved.
    * @return array
    */
    public function save_meta_boxes( $mbs ) {
    $mbs = array_merge( $mbs, $this->get_meta_boxes() );
    return $mbs;
    }

    /**
    * Display the tab header in the WP SEO metabox
    */
    public function tab_header() {
    global $post;

    if($this->options[‘newssitemap_include_’.$post->post_type] == “on”){
    echo ‘<li class=”news”><a href=”#wpseo_news”>’ . __( ‘Google News’ ) . ‘</a>’;
    } else {
    return false;
    }
    }

    /**
    * Create the content for the tab and return it to the parent class for handling.
    *
    * @return string Contents of the tab
    */
    public function tab_content() {
    global $post;

    if($this->options[‘newssitemap_include_’.$post->post_type] == “on”){
    $content = ”;
    foreach ( $this->get_meta_boxes() as $meta_box ) {
    $content .= $this->do_meta_box( $meta_box );
    }
    $this->do_tab( ‘news’, __( ‘Google News’ ), $content );
    } else {
    return false;
    }
    }

    /**
    * The metaboxes to display and save for the tab
    *
    * @return array $mbs
    */
    public function get_meta_boxes() {
    $mbs = array();
    $stdgenre = ( isset( $this->options[‘newssitemap_default_genre’] ) ) ? $this->options[‘newssitemap_default_genre’] : ‘blog’;
    $mbs[‘newssitemap-include’] = array(
    “name” => “newssitemap-include”,
    “type” => “checkbox”,
    “std” => “on”,
    “title” => __( “Include in News Sitemap” )
    );
    $mbs[‘newssitemap-keywords’] = array(
    “name” => “newssitemap-keywords”,
    “type” => “text”,
    “std” => “”,
    “title” => __( “Meta News Keywords” ),
    “description” => __( “Comma separated list of the keywords this article aims at.”, “wordpress-seo” ),
    );
    $mbs[‘newssitemap-genre’] = array(
    “name” => “newssitemap-genre”,
    “type” => “multiselect”,
    “std” => $stdgenre,
    “title” => __( “Google News Genre”, ‘yoast-wpseo’ ),
    “description” => __( “Genre to show in Google News Sitemap.”, ‘yoast-wpseo’ ),
    “options” => array(
    “none” => __( “None”, ‘yoast-wpseo’ ),
    “pressrelease” => __( “Press Release”, ‘yoast-wpseo’ ),
    “satire” => __( “Satire”, ‘yoast-wpseo’ ),
    “blog” => __( “Blog”, ‘yoast-wpseo’ ),
    “oped” => __( “Op-Ed”, ‘yoast-wpseo’ ),
    “opinion” => __( “Opinion”, ‘yoast-wpseo’ ),
    “usergenerated” => __( “User Generated”, ‘yoast-wpseo’ ),
    ),
    );
    $mbs[‘newssitemap-original’] = array(
    “name” => “newssitemap-original”,
    “std” => “”,
    “type” => “text”,
    “title” => __( “Original Source”, ‘yoast-wpseo’ ),
    “description” => __( ‘Is this article the original source of this news? If not, please enter the URL of the original source here. If there are multiple sources, please separate them by a pipe symbol: | .’, ‘yoast-wpseo’ ),
    );
    $mbs[‘newssitemap-stocktickers’] = array(
    “name” => “newssitemap-stocktickers”,
    “std” => “”,
    “type” => “text”,
    “title” => __( “Stock Tickers”, ‘yoast-wpseo’ ),
    “description” => __( ‘A comma-separated list of up to 5 stock tickers of the companies, mutual funds, or other financial entities that are the main subject of the article. Each ticker must be prefixed by the name of its stock exchange, and must match its entry in Google Finance. For example, “NASDAQ:AMAT” (but not “NASD:AMAT”), or “BOM:500325” (but not “BOM:RIL”).’, ‘yoast-wpseo’ ),
    );
    return $mbs;
    }

    }

    $wpseo_news_xml_metabox = new WPSEO_XML_News_Sitemap_Metabox();

    ———————
    `
    then change the following code in xml-news-sitemap-class.php line 58 from:

    $post_types = “‘post'”;

    to

    $post_types = “‘post’, ‘tribe_events'”;

    with the name of your custom posts being in my case ‘tribe_events, the name has to be exactly what your custom posts are called.

    Thanks

    This code works on the Github page for me now. What you have to be sure of is to change the code on line 58

    from

    $post_types = “‘post'”;

    to

    $post_types = “‘post’, ‘tribe_events'”;

    with the name of your custom posts being in my case ‘tribe_events, the name has to be exactly what your custom posts are called.

    I hope this helps.

    Hi Guys check out this link where there is a solution that partially works for me but works for others. https://github.com/jdevalk/Google-News-Sitemap/issues/20

    I think it depends on how your custom posts are set up? Open to your solution on how to make this work 100%

    bleggate

    (@bleggate)

    Appreciating that tracking is tricky for this, what would you suggest as I have the same issue with a redirect on my blog where a user who arrives on a mobile is redirected and my analytics for the site that has the redirect on it is not tracking the code? Please advise what I can do?

    Cheers

    Benji

    Legend this worked a treat for adding a border to images in advanced blogroll. Thank you

    Now I am having to say I need to look at this.
    There is a conflict with Sexy bookmarks for some reason which was spitting out code (so just deactivated), Also there is a new tab to make new events (I see it now) and as for my old events, just need to work out how to get these showing. Must be an import or moving files around. Not sure as yet.

    Same. I have Genesis frame work with a Mocha child theme and on upgrading there is nolonger any events. Just standard blog pages? If I go to make a new event/ post the drop down to insert event details is not appearing either, it is as if the plugin is not activated or installed?
    Love to hear the solution as I am sure this will be a fantastic plugin.

    Thread Starter bleggate

    (@bleggate)

    Hi Yes I have modified the template for the events calandar. Here are the two files as I have them. Sounds reasonalble. Let me know where you think I have gone wrong with my </div>

    single.php

    <?php
    global $spEvents;
    $spEvents->loadDomainStylesScripts();
    get_header();
    ?>
    <?php get_sidebar( ‘alt’ ); ?>
    <div id=”content” style=” padding-left: 30px; “>
    <div id=”tec-content” class=”tec-event widecolumn”>
    <?php the_post(); global $post; ?>
    <div id=”post-<?php the_ID() ?>” <?php post_class() ?>>
    <span class=”back”>“><?php _e(‘« Back to Events’, $spEvents->pluginDomain); ?></span>
    <?php echo adrotate_group(2); ?>
    <div><span> </span></div>
    <h2 class=”entry-title”><?php the_title() ?></h2>
    /?ical=<?php echo $post->ID; ?>”><?php _e(‘iCal Import’, $spEvents->pluginDomain) ?>
    <?php if (the_event_end_date() > time() ) { ?><small><?php _e(‘This event has passed.’, $spEvents->pluginDomain) ?></small> <?php } ?>
    <div id=”tec-event-meta”>
    <dl class=”column”>
    <dt><?php _e(‘Start:’, $spEvents->pluginDomain) ?></dt>
    <dd><?php echo the_event_start_date(); ?></dd>
    <?php if (the_event_start_date() !== the_event_end_date() ) { ?>
    <dt><?php _e(‘End:’, $spEvents->pluginDomain) ?></dt>
    <dd><?php echo the_event_end_date(); ?></dd>
    <?php } ?>
    <?php if ( the_event_cost() ) : ?>
    <dt><?php _e(‘Cost:’, $spEvents->pluginDomain) ?></dt>
    <dd><?php echo the_event_cost(); ?></dd>
    <?php endif; ?>
    </dl>
    <dl class=”column”>
    <?php if(the_event_venue()) : ?>
    <dt><?php _e(‘Venue:’, $spEvents->pluginDomain) ?></dt>
    <dd><?php echo the_event_venue(); ?></dd>
    <?php endif; ?>
    <?php if(the_event_phone()) : ?>
    <dt><?php _e(‘Phone:’, $spEvents->pluginDomain) ?></dt>
    <dd><?php echo the_event_phone(); ?></dd>
    <?php endif; ?>
    <?php if( tec_address_exists( $post->ID ) ) : ?>
    <dt>
    <?php _e(‘Address:’, $spEvents->pluginDomain) ?>
    <?php if( get_post_meta( $post->ID, ‘_EventShowMapLink’, true ) == ‘true’ ) : ?>
    <?php $mapArgs = array(“f”=>”q”,”source”=>”s_q”,”geocode”=>””); ?>
    ” title=”<?php _e(‘Click to view a Google Map’, $spEvents->pluginDomain); ?>” target=”_blank”><?php _e(‘Google Map’, $spEvents->pluginDomain ); ?>
    <?php endif; ?>
    </dt>
    <dd>
    <?php tec_event_address( $post->ID ); ?>
    </dd>
    <?php endif; ?>
    </dl>
    </div>
    <?php if( get_post_meta( $post->ID, ‘_EventShowMap’, true ) == ‘true’ ) : ?>
    <?php if( tec_address_exists( $post->ID ) ) event_google_map_embed(); ?>
    <?php endif; ?>
    <div class=”entry”>
    <?php the_content(); ?>
    <?php if (function_exists(‘the_event_ticket_form’)) { the_event_ticket_form(); } ?>
    </div>
    <?php edit_post_link(‘Edit’, ‘<span class=”edit-link”>’, ‘</span>’); ?>
    </div><!– post –>

    <?php if(eventsGetOptionValue(‘showComments’,’no’) == ‘yes’){ comments_template();} ?>

    <?php genesis_author_box( ‘single’ );

    ?>
    <?php genesis_get_comments_template();

    ?>

    </div></div><!– tec-content –>
    <?php get_sidebar(); ?>

    <?php
    get_footer();

    Gridview.php

    <?php
    global $spEvents;
    $spEvents->loadDomainStylesScripts();
    get_header();
    ?>
    <div id=”content-sidebar-wrap”>
    <div id=”tec-content” class=”grid”>
    <div id=’tec-events-calendar-header’ class=”clearfix”>
    <h2 class=”tec-cal-title”><?php _e(‘Calendar of Events’, $spEvents->pluginDomain) ?></h2>
    <span class=’tec-month-nav’>
    <span class=’tec-prev-month’>
    ‘>
    ← <?php echo events_get_previous_month_text(); ?>

    </span>

    <?php get_jump_to_date_calendar( “tec-” ); ?>

    <span class=’tec-next-month’>
    ‘>
    <?php echo events_get_next_month_text(); ?> →

    </span>
    </span>

    <span class=’tec-calendar-buttons’>
    ‘><?php _e(‘Event List’, $spEvents->pluginDomain)?>
    ‘><?php _e(‘Calendar’, $spEvents->pluginDomain)?>
    </span>
    </div><!– tec-events-calendar-header –>
    <?php
    global $wp_query;
    $tecCatObject = get_category( $wp_query->query_vars[‘cat’])
    ?>
    /?ical=<?php echo $tecCatObject->slug; ?>”><?php _e(‘iCal Import’, $spEvents->pluginDomain) ?>
    <?php event_grid_view(); // See the plugins/the-events-calendar/views/table.php template for customization ?>
    </div></div>
    <?php /* For custom template builders…
    * The following init method should be called before any other loop happens.
    */
    $wp_query->init(); ?>
    <?php get_sidebar( ‘alt’ ); ?>
    <?php get_footer(); ?>

    Thread Starter bleggate

    (@bleggate)

    Looked into this further and if I deactivate The Events Calendar Plugin it all seems okay, but I do not understand as it was working 100% with this plugin activated, so not sure what has changed.
    Any assistance welcomed

    Thank you.
    Worked a treat for me although I now have another issue which i do not think is related but might be.

    my theme layout has suddenly broken by pulling the sidebars incorrectly.
    sidebar content sidebar layout is okay as is full content is okay but when layout of sidebar- content or content-sidebar is called the sidebars are pulled when they are not meant to be.

    My default layout is sidebar-content-sidebar

    sidebar-content
    The sidebar primary is called followed by the content followed by the sidebar-alt

    content-sidebar
    the content is called then the sidebar then the sidbar-alt under the comments feild.

    Very odd

    You can view here.

    https://margaretriverguide.com.au/eguide

    and here

    https://margaretriverguide.com.au/resources/testing/

    I would appreciate your assistance and some pointers as I can not find the cause of this issue.

    Recent actions include upgrades to wordpress 3.2.1 and genesis.
    Instal of flash video player plugin (uninstalled to see if fixed problem but with no difference) and this change to The Events Calendar.

    If I deactivate the events calendar the theme is all okay again, so may or may not be related to this change, although I have it working on another similar site? r3volution11 I would appreciate you looking as you have a sound knowledge of this plugin or anyone else who has a good idea to try.

    Thanks

    Copy of my single.php

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Both work for gridview layout sidebar-content and event layout of sidbar-content-sidebar

    This is for a child theme on Genesis and I also pull the comments field

    Hope this helps.

    Legend worked for me.
    Thank you

Viewing 15 replies - 1 through 15 (of 29 total)