JohnnyDMonic
Forum Replies Created
-
Forum: Plugins
In reply to: [Add Meta Tags] Meta for custom categoriesI had the same problem. I am using Add-Meta-Tags as well as The Events Calendar on my site. I wanted AMT to add “NOINDEX, FOLLOW” robots meta data to events categories as well as normal blog categories.
I came up with the following solution: in the function amt_get_metadata_head() in add-meta-tags.php, add the is_tax line in the following section of code:
( is_search() && ($options["noindex_search_results"] == "1") ) || // Search results ( is_date() && ($options["noindex_date_archives"] == "1") ) || // Date and time archives ( is_category() && is_paged() && ($options["noindex_category_archives"] == "1") ) || // Category archives (except 1st page) ( is_tax('tribe_events_cat') && ($options["noindex_category_archives"] == "1") ) || // Hopefully cope with event category archives ( is_tag() && is_paged() && ($options["noindex_tag_archives"] == "1") ) || // Tag archives (except 1st page) ( is_author() && is_paged() && ($options["noindex_author_archives"] == "1") ) // Author archives (except 1st page)I realise that this will get overwritten if I update the plugin but for now it works for me. What AMT really needs is somewhere in the control panel where you can list the names of your custom categories so it automatically includes them as well.
Hope that helps somehow.
Cheers,
John.
Forum: Plugins
In reply to: [The Events Calendar] Overriding events widgetThanks for the reply.
I did have a look at that page, but all I could learn from it was that I could override list-widget.php, but that only contains the code for a single list item in the widget. What I need to do is override the entire widget.
I ended up modifying widget-list.class.php to make the changes I needed. I know this is bad practice but I couldn’t work out another way.
I would be very grateful if someone could describe the correct way of doing this within my child theme.