Home User profile
tagDiv Member
Christopher is a long time WordPress user. Anything else you need to know is private ;-) I *do not* work for TagDiv, but I've been using their themes since late 2013.
simchris
tagDiv Member

One more ….
it’s also recommended to explicitly define your website URL in your wp-config.php file at the end of the file

e.g.

define('WP_HOME', 'http://mywebsite.com');
define('WP_SITEURL', 'http://mywebsite.com');
simchris
tagDiv Member

And here’s what I have in my robots.txt file

User-agent: *
 Disallow: /cgi-bin
 Disallow: /cgi-bin/
 Disallow: /wp-admin
 Disallow: /wp-admin/
 Disallow: /wp-includes
 Disallow: /wp-includes/
 Disallow: /wp-content/plugins
 Disallow: /wp-content/cache
 Disallow: /wp-content/themes
 Disallow: /wp-content/upgrade
 Disallow: /wp-content/backup-*
 Disallow: /aff/
 Disallow: /search/*/*
 Disallow: /trackback
 Disallow: */trackback
 Disallow: /trackback/
simchris
tagDiv Member

My mods to functions.php
use at your own risk; search google for why/what/where any of this might be useful, or may not work at all

/*CHRISTOPHER'S CUSTOM MODS - 1.12.14 rev1 */

add_filter('the_generator', create_function('', 'return "";'));
remove_action('wp_head', 'rsd_link');
remove_action('wp_head', 'wlwmanifest_link');
remove_action('wp_head', 'wp_generator');
remove_action('wp_head', 'feed_links', 2 );
remove_action('wp_head', 'feed_links_extra', 3 );

add_filter( 'pre_comment_content', 'wp_specialchars' );

function no_errors_please(){
  return 'GET OFF MY LAWN !! RIGHT NOW !!';
}
add_filter( 'login_errors', 'no_errors_please' );

/* Disable YOAST SEO Admin Bar. */
function mytheme_admin_bar_render() {
	global $wp_admin_bar;
	$wp_admin_bar->remove_menu('wpseo-menu');
}
// and we hook our function via
add_action( 'wp_before_admin_bar_render', 'mytheme_admin_bar_render' );

function delete_enclosure(){
 return '';
 }
 add_filter( 'get_enclosed', 'delete_enclosure' );
 add_filter( 'rss_enclosure', 'delete_enclosure' );
 add_filter( 'atom_enclosure', 'delete_enclosure' );

function remove_cssjs_ver( $src ) {
    if( strpos( $src, '?ver=' ) )
        $src = remove_query_arg( 'ver', $src );
    return $src;
}
add_filter( 'style_loader_src', 'remove_cssjs_ver', 10, 2 );
add_filter( 'script_loader_src', 'remove_cssjs_ver', 10, 2 );

add_filter( 'jpeg_quality', create_function( '', 'return 50;' ) );

function remove_pingback_url( $output, $show ) {
    if ( $show == 'pingback_url' ) $output = '';
    return $output;
}
add_filter( 'bloginfo_url', 'remove_pingback_url', 10, 2 );
  • This reply was modified 12 years by simchris.
simchris
tagDiv Member

Hi
only use the mod_pagespeed stuff if your web hosting provider has Google mod_pagespeed installed – ask them about that, and what functions they support. Don’t use that if your host doesn’t have it installed.

And i should put this code in the final of function.php?

add_filter( 'jpeg_quality', create_function( '', 'return 50;' ) );

YES! 🙂

——————

Hi, here is my current optimized site .htaccess
NOT including mod_pagespeed (may not apply to you)
NOT including my redirects
NOT including my permalink structure

SO, assuming end of the # wordpress stuff

# END WordPress

AddType text/javascript .js

# BEGIN Expire headers
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 5 seconds"
ExpiresByType image/x-icon "access plus 2500000 seconds"
ExpiresByType image/jpeg "access plus 2500000 seconds"
ExpiresByType image/png "access plus 2500000 seconds"
ExpiresByType image/gif "access plus 2500000 seconds"
ExpiresByType application/x-shockwave-flash "access plus 2500000 seconds"
ExpiresByType text/css "access plus 700000 seconds"
ExpiresByType text/javascript "access plus 700000 seconds"
ExpiresByType application/javascript "access plus 700000 seconds"
ExpiresByType application/x-javascript "access plus 700000 seconds"
ExpiresByType text/html "access plus 600 seconds"
ExpiresByType application/xhtml+xml "access plus 600 seconds"
</IfModule>
# END Expire headers

# BEGIN Cache-Control Headers
<IfModule mod_headers.c>
<filesMatch "\.(ico|jpe?g|png|gif|swf)$">
Header set Cache-Control "public"
</filesMatch>
<filesMatch "\.(css)$">
Header set Cache-Control "public"
</filesMatch>
<filesMatch "\.(js)$">
Header set Cache-Control "private"
</filesMatch>
<filesMatch "\.(x?html?|php)$">
Header set Cache-Control "private, must-revalidate"
</filesMatch>
</IfModule>
# END Cache-Control Headers

<IfModule mod_headers.c>
    Header unset ETag
</IfModule>
<IfModule mod_alias.c>
RedirectMatch 403 /xmlrpc.php
</IfModule>
simchris
tagDiv Member

Hi,
you may want to read through the entire pagespeed topic (big sticky top of the forum), as all of this has been well covered there.

Generally you can’t do anything about things like addthis (although I did post a hack to load that in async mode), or jetpack – as those load on other servers and will show up as errors when you run pagespeed analytics. If it’s not loading off your site, it will likely show up as an error of some kind – this includes recaptcha, adsense ads, etc.

Not sure what you mean about looking at source code of theme vs source code of the page — the theme code is not rendered while the code on your site is rendered with all the stuff coming from dbase and external and queries, etc. If you’re trying to compare the “demo” to your pages, that may not work either. You should follow the instructions to setup the cache (remember you need to CLEAR cache every time you change things like htaccess, new plugin, etc.), the speed booster, the page expires time.

For realistic speed – test without addthis, adsense, or jetpack. Then put that stuff back and decide how much impact you want to have on your site. I use addthis for social buttons on one site, and then the theme stuff on another. I don’t use jetpack as it’s slow and I hate loading stuff from a mothership that isn’t my own. I limit number of ads on page (4 ads will be slow if images!) – try loading text only ads, to speed up page!

But a *lot* of this, if not all, has been covered in the pagespeed topic. So, best to start there, and remember it’s virtually impossible to get above 91-93 in desktop with a busy site, lots of pix, wordpress theme, external stuff. Mobile will be slower, no matter what you do. 76+ isn’t too awful right now. 80+ is goal. 65 would be awful. To really optimize for mobile requires making a version of page which most newspaper sites won’t do, and that is mostly text, one picture, minimal navigation, etc.

Google sadly doesn’t differentiate from “tablet friendly” and “iphone friendly.” SO, I’ve stopped crying over trying for a perfect score on phones — it’s not my primary audience. Tablets are, then desktop.

Anyway… that might not help. But
1) set cache to page cache ONLY
2) don’t use any minification stuff until you have speed booster plugin working right
3) make sure your htaccess has expires headers
4) make sure your web server is doing gzip/deflate
5) optimize your images prior to upload; if possible use my hack to increase compression level for thumbnails (or use smush.it or similar; I prefer to edit my functions.php file to change compression to “50”)
6) run your speed tests
7) turn off anything you don’t absolutely NEED if you’re seeking highest score
8) test and retest

THEME UPDATES:
I find it’s best to fully over-write the old theme with NEW theme folder each time, via FTP. I’ve had mixed results with “patching” over the past 10 years with WP sites, and more often than not they break somewhere due to permissions.

Frankly, it’s good habit, since you can also download a full snapshot via FTP before you do an update, to ensure you have a full snapshot. I date and RAR mine here for archival purposes.

  • This reply was modified 12 years by simchris.
  • This reply was modified 12 years by simchris.
simchris
tagDiv Member

Basically Google is against ANY “text link” advertising or text linking networks… however, if you are adding rel=nofollow you’re likely fine, but many sponsors want dofollow “pretend organic links” …. you will have to research that. Best to fully read and digest Google’s official webmaster guidelines on text links:
https://support.google.com/webmasters/answer/66356

Webmaster guidelines – current:
https://support.google.com/webmasters/answer/35769

Everybody on this forum should likely have read this SEO guide already (2010 version):
http://www.google.com/webmasters/docs/search-engine-optimization-starter-guide.pdf

However, be aware they are “whacking” major “link selling” networks, which has been a major effort since last Summer, including the TLA (Text Link Ads) folks.

ref
http://searchengineland.com/google-busts-yet-another-link-network-anglo-rank-179296

TO CLARIFY:
organic links to things mentioned in an original article are organic – linking to GoDaddy if you mention them in tutorial on how to use their mod_pagespeed settings, for example. So, just linking to Apple’s website page about their new Mac, in doing review would not be spammy.

ALL sponsored links on pages and in articles should be rel=nofollow or you will be bitten! Linking to GoDaddy or “domain registration” with a dofollow sponsored link in an article is spammy.

  • This reply was modified 12 years by simchris.
  • This reply was modified 12 years by simchris.
simchris
tagDiv Member

Hi, yes …
first backup your htaccess file

then paste my code at end, after the wordpress stuff

then try it 🙂

If site doesn’t load, go back to your backup.

Should NOT break anything …

it should work like magic when you go retest your page score 🙂

simchris
tagDiv Member

speed is impacted by the elements on page and specifically by things loading externally – meaning social media, ads, etc. which are loaded from external sources will vary by page and time of day, etc.

Try using the GTMetrix.com to test your site, as it has better suggestions for improvement than Google PageSpeed Insights.

Also from your screen shot, it looked like the mobile page wasn’t even loading the style sheet. A page full of bullet points does NOT look right there.

simchris
tagDiv Member

See the topics in the docs re setting up page cache, speed booster plugin, and manual fixes to optimize site for pagespeed:
https://forum.tagdiv.com/newspaper-documentation/

simchris
tagDiv Member

Be aware Google and Bing would likely consider linking story title to a “sponsor” as text link advertising – which they would really ding you for. Just a thought.

simchris
tagDiv Member

Yoast SEO does that and has on/off option 🙂

simchris
tagDiv Member

Hi, I’m just switching to v3 from v2 finally, but in the earlier version you could just specify one of the default modules for those pages, which would have the excerpt.

E.g., module 8 or module 9

Modules and Blocks
https://forum.tagdiv.com/modules-and-blocks/
Posted on October 24, 2013 by Daniela

1. Modules

This modules layouts can be used on:
◾Latest article using a Homepage with article list
◾Category page
◾Blog index
◾Archive page
◾Attachment page
◾Author page
◾Tag page
◾Search page
◾404 page

simchris
tagDiv Member

Thanks, Radu

looks like I didn’t scroll down far enough in the wp_booster folder 😉

thanks… this works for me in v3, as it did in v2
changing
static $post_view_counter_key = 'post_views_count';
to
static $post_view_counter_key = 'views';

awesome! 🙂

THis would be something good to add to tutorial page, since this will be a common issue for folks migrating from existing theme where a wp_meta (custom field) has been already created with post views tracking, either by a theme or a plugin.

THANKS!!

simchris
tagDiv Member

Marius, et al

Can you add an additional help/tutorial to this page in the documentation:
https://forum.tagdiv.com/using-the-theme-with-existing-content/

Working with an existing post view/counter:
Change data field name to existing custom field.
(how to)

THanks!

simchris
tagDiv Member

Nice site! 🙂

simchris
tagDiv Member

And,
I should point out that I’m just now moving to v3 from v2,
and at the moment cannot locate WHERE to change the call to the custom data field for the view counter. (d’oh).

MARIUS/RADU’S:
Could your point me at the location of the correct file to change the views ‘counter’ field to “views” from the default field?

Thanks!

simchris
tagDiv Member

HI
fyi, the theme installs a meta field for post views and starts counting once the story is viewed once theme is installed. There is no way for this new data field to count OLD reads from existing content, such as a year ago as the meta field didn’t exist.

On our sites we were using a very old and respected “view counter” and this used the meta field of “views” — so each update we actually have to hack the theme file to change the theme meta field to use our existing views data field.

If you have an existing view counter meta field, you can switch to use that existing field which was counting reads/views (or ‘hits’ as some might call them erroneously).

If no tracking meta field existed in the past – there is no way for the theme to “read” that field to display the number of reads “in the past.”

MORE SPECIFICALLY HOWEVER:
since I don’t use jetpack, and if all your views are stored in jetpack, then obviously the connector needs to ping that datafield stored “in the cloud” on Automattic’s servers where that data lives. But, check your meta (custom fields, if you prefer) for an older post. If there is a data field showing 4,000 reads for that post in your local dbase then all you’d need to do is change the hit counter module to use that existing data field by name and NOT use the one created by the theme.

Ideally – it would be wonderful to have an option to “use existing hit counter data field” option in the admin panel, particularly for a “newspaper” theme where this might be tracked more seriously that a parakeet blog. Or, a custom config file to specify that sort of thing vs hacking the theme each time.

custom-config.php
> use custom read counter field
> turn off hit counter on indexes and home page
> turn on author byline on home page and indexes
> turn on author byline on posts (should be default “on”)
(etc)

  • This reply was modified 12 years by simchris.
  • This reply was modified 12 years by simchris.
simchris
tagDiv Member

Hi
this may not be the answer to your question, but:
make sure you have installed the Contact Form 7 Plugin; it should show as installed from your theme admin > plugins

You may also find the docs for Contact Form 7 helpful:
http://contactform7.com/docs/

simchris
tagDiv Member

@raugustox
Hi ! Nope I don’t work here.
I just kind of “adopted” this theme last year since we had been working on building something in house very much like this and then when I found this, they were further along, so decided to just use this since it had the micro data, bootstrap elements, above average knowledge of pagespeed (MOST WP theme companies have never used PageSpeed Insights… which as of this year is pretty pathetic, if you ask me).

Since I was doing a lot of work on our two test sites, I was popping in here everyday with version 2 and just started sharing info since I’ve been using WP since 2005ish, and have suffered most of the pains that the newbies/scrubs are running into. 🙂

My apologies if I ever offend anybody by stating the obvious sometimes, but I know I’ve gotten a LOT of help on forums over the years, so it’s kind of my way to pay back, pay forward, keep theme going, etc.

I don’t work for tagDiv and have no financial involvement or other relationship.

Just a big sappy fan ! 🙂

simchris
tagDiv Member

We’ve had horrible results with jetpack … we simply don’t use it anymore; slows down site, often breaks, blah blah. Stats work fine when not using jetpack.

My two cents only. Your mileage may vary.

simchris
tagDiv Member

This may be useful, it shows which Twitter APIs are having technical problems:
https://dev.twitter.com/status

(may not be related to your issue; but I always check this FIRST when I see some weirdness with Twitter on our sites …)

  • This reply was modified 12 years by simchris.
simchris
tagDiv Member

It’s safe to jump from earlier version to new one. I usually skip every couple 🙂

simchris
tagDiv Member

Not sure if this will work for you, but I use the “Auto-hyperlink URLs” plugin by Scott Reilly, one of the oldest plugin guys out there : http://coffee2code.com/wp-plugins/auto-hyperlink-urls/

we use this on a news portal to save having to manualy make all the visible URLs live.

If you’re trying to make anchor links on words live in the excerpts you will likely need to hack the code to change the clean data to the rich data.

simchris
tagDiv Member

Wordpress org has wonderful help on how basic wordpress functions work, see:
https://codex.wordpress.org/Child_Themes

Viewing 25 posts - 9,026 through 9,050 (of 9,335 total)