Forum Replies Created

Viewing 15 replies - 1 through 15 (of 56 total)
  • Thread Starter sunriseweb

    (@sunriseweb)

    Here is a gist where I’ve made modifications to apply a filter called ‘customtaxorder_exclude_taxonomies’ in the code. It works well and would be great if you added something like it. Thanks!

    $customtaxorder_exclude_taxonomies = array('post_tag', 'product_tag');
    if ( in_array($taxonomy, apply_filters( 'customtaxorder_exclude_taxonomies', $customtaxorder_exclude_taxonomies )) ) {
    	// no filtering so the test in wp_generate_tag_cloud() works out right for us
    	// filtering will happen in the tag_cloud_sort filter sometime later
    	// post_tag = default tags
    	// product_tag = woocommerce product tags
    	return $terms;
    }

    I hook into this new filter by using:

    add_filter( 'customtaxorder_exclude_taxonomies', 'add_taxonomy_to_customtaxorder_exclude_taxonomies' );
    function add_taxonomy_to_customtaxorder_exclude_taxonomies( $taxonomies ) {
          $taxonomies[] = 'directory';
          return $taxonomies;
    }
    Thread Starter sunriseweb

    (@sunriseweb)

    Yep – worked like a charm.

    Thread Starter sunriseweb

    (@sunriseweb)

    Aha – that must have been it. Thanks!

    I’d love it if the plugin supported custom post types and custom taxonomies. That’s what I really need. I may take a look at the plugin code and try this myself.

    Thank you @primaltwins – I needed that too!

    You can hard code the values into the Breadcrumb NavXT “Home Template” something like this:

    <a href="%link%"><!--:en-->Policy Library<!--:--><!--:fr-->Bibliothèque des politiques<!--:--></a>

    Note that I could not put in the qtranslate codes twice, so just removed the title attribute of the link.

    Forum: Plugins
    In reply to: [Yoast SEO] StopWords List

    FYI – As of today the 173 stop words are:

    Array (
     [0] => a
     [1] => about
     [2] => above
     [3] => after
     [4] => again
     [5] => against
     [6] => all
     [7] => am
     [8] => an
     [9] => and
     [10] => any
     [11] => are
     [12] => aren't
     [13] => as
     [14] => at
     [15] => be
     [16] => because
     [17] => been
     [18] => before
     [19] => being
     [20] => below
     [21] => between
     [22] => both
     [23] => but
     [24] => by
     [25] => can't
     [26] => cannot
     [27] => could
     [28] => couldn't
     [29] => did
     [30] => didn't
     [31] => do
     [32] => does
     [33] => doesn't
     [34] => doing
     [35] => don't
     [36] => down
     [37] => during
     [38] => each
     [39] => few
     [40] => for
     [41] => from
     [42] => further
     [43] => had
     [44] => hadn't
     [45] => has
     [46] => hasn't
     [47] => have
     [48] => haven't
     [49] => having
     [50] => he
     [51] => he'd
     [52] => he'll
     [53] => he's
     [54] => her
     [55] => here
     [56] => here's
     [57] => hers
     [58] => herself
     [59] => him
     [60] => himself
     [61] => his
     [62] => how
     [63] => how's
     [64] => i
     [65] => i'd
     [66] => i'll
     [67] => i'm
     [68] => i've
     [69] => if
     [70] => in
     [71] => into
     [72] => is
     [73] => isn't
     [74] => it
     [75] => it's
     [76] => its
     [77] => itself
     [78] => let's
     [79] => me
     [80] => more
     [81] => most
     [82] => mustn't
     [83] => my
     [84] => myself
     [85] => no
     [86] => nor
     [87] => not
     [88] => of
     [89] => off
     [90] => on
     [91] => once
     [92] => only
     [93] => or
     [94] => other
     [95] => ought
     [96] => our
     [97] => ours
     [98] => ourselves
     [99] => out
     [100] => over
     [101] => own
     [102] => same
     [103] => shan't
     [104] => she
     [105] => she'd
     [106] => she'll
     [107] => she's
     [108] => should
     [109] => shouldn't
     [110] => so
     [111] => some
     [112] => such
     [113] => than
     [114] => that
     [115] => that's
     [116] => the
     [117] => their
     [118] => theirs
     [119] => them
     [120] => themselves
     [121] => then
     [122] => there
     [123] => there's
     [124] => these
     [125] => they
     [126] => they'd
     [127] => they'll
     [128] => they're
     [129] => they've
     [130] => this
     [131] => those
     [132] => through
     [133] => to
     [134] => too
     [135] => under
     [136] => until
     [137] => up
     [138] => very
     [139] => was
     [140] => wasn't
     [141] => we
     [142] => we'd
     [143] => we'll
     [144] => we're
     [145] => we've
     [146] => were
     [147] => weren't
     [148] => what
     [149] => what's
     [150] => when
     [151] => when's
     [152] => where
     [153] => where's
     [154] => which
     [155] => while
     [156] => who
     [157] => who's
     [158] => whom
     [159] => why
     [160] => why's
     [161] => with
     [162] => won't
     [163] => would
     [164] => wouldn't
     [165] => you
     [166] => you'd
     [167] => you'll
     [168] => you're
     [169] => you've
     [170] => your
     [171] => yours
     [172] => yourself
     [173] => yourselves
    )

    @mateju – thank you! Worked perfectly for me.

    I just noticed that you should also pass the existing $args variable to the filter. For example I am just changing the sort order for a specific forum id.

    //* Change sort order of Topics within a specified bbpress forum
    function my_custom_display_topic_index_query ($args) {
      $thisforumid = bbp_get_forum_id();
    
      if($thisforumid == 43135) {
        $args['orderby'] = 'date';
        $args['order']   = 'ASC';
      }
    
      return $args;
    }
    add_filter('bbp_before_has_topics_parse_args', 'my_custom_display_topic_index_query ' );

    @ritajoc this is exactly what my client wanted too. I found the answer here:

    https://wordpress.stackexchange.com/questions/135628/arrange-bbpress-topics-by-created

    Just needed to change the order from DESC to ASC. Add this following code to a plugin or your active theme’s functions.php file.

    function my_custom_display_topic_index_query () {
      $args['orderby'] = 'date';
      $args['order']   = 'ASC';
    
      return $args;
    }
    add_filter('bbp_before_has_topics_parse_args', 'my_custom_display_topic_index_query' );

    I’m having a similar problem. I had to use the method I outlined in this post – to make it work.

    You meed to do a meta_query on the Products post CPT-onomy taxonomy using the post ID. Something like:

    'meta_query' => array(
                       array(
                          'key' => '_custom_post_type_onomies_relationship',
                          'value' => array(PRODUCTS_POST_ID),
                          'compare' => 'IN',
                       )
                     )
    Thread Starter sunriseweb

    (@sunriseweb)

    On what might be a related note, when I get_term inside a function it returns the wrong result, but works fine directly in a template:

    global $cpt_onomy;
    $termone = $cpt_onomy->get_term( 95, 'countries' );

    However the following code works fine if I put it inside the same function.

    $terms = get_terms("countries", 'orderby=name&hide_empty=0');
    $count = count($terms);
    if ( $count > 0 ){
       echo "<ul>";
       echo '<li># Countries='.$count.'</li>';
       foreach ( $terms as $term ) {
         $thisterm = $cpt_onomy->get_term( $term->term_id, 'countries' );
         echo "<li> ". $thisterm->term_id . '=' . $term->term_id . " : " . $term->name . "</li>";
    
       }
       echo "</ul>";
    }

    I ended up using the Events Manager plugin and the custom post type that comes with it to treat events separately from blog posts. Sorry – not much help. The site turned out well though I think – https://harmonyhousetheatre.com .

    Thread Starter sunriseweb

    (@sunriseweb)

    Just downloaded Calendar v1.3.3 – alas but problem still exists ??

    I’m looking at how the Events Manager plugin overrides the calls for event data to see if I can do something similar. May just end up using the Events Manager plugin even though it is overkill for what I need.

    In the wp-fullcalendar.php the code checks to see if the Events Manager plugin is installed:

    //START Events Manager Integration
    		if( defined('EM_VERSION') ){
    		    include('wpfc-events-manager.php');
    		    wpfc_em_init();
    		}
    		//END Events Manager Integration

    In the wpfc_em_init() function it removes the actions that get the event posts and use the post publish date to build the json, and adds in it’s own that build the json using the Event Manager specific info:

    remove_action('wp_ajax_WP_FullCalendar', array('WP_FullCalendar','ajax'));
    		remove_action('wp_ajax_nopriv_WP_FullCalendar', array('WP_FullCalendar','ajax'));
    		add_action('wp_ajax_WP_FullCalendar', 'wpfc_em_ajax');
    		add_action('wp_ajax_nopriv_WP_FullCalendar', 'wpfc_em_ajax');

    So I’m thinking that maybe I’ll create my own function that is the equivalent of wpfc_em_ajax and add it in the same way. The problem is that I think I’ll have to hack the core code of wp-fullcalendar.php so that it recognizes my function – may try it without that first.

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