WorthyWP
Forum Replies Created
-
Forum: Plugins
In reply to: [The SEO Framework – Fast, Automated, Effortless.] Add Breadcrumbs to ThemeSo basically I put into my functions.php file —
function convertBreadcrumbsToMicrodata($breadcrumbs)
{
// remove the XML namespace
$breadcrumbs = str_replace(‘ xmlns:v=”https://rdf.data-vocabulary.org/#”‘, ”, $breadcrumbs);
// convert each breadcrumb
$breadcrumbs = preg_replace(
‘/<span typeof=”v:Breadcrumb”>([^<]+)<\\/a><\\/span>/’,
‘<span itemscope itemtype=”https://data-vocabulary.org/Breadcrumb”><span itemprop=”title”>$2</span></span>’,
$breadcrumbs
);
$breadcrumbs = preg_replace(
‘/<span typeof=”v:Breadcrumb”><span class=”breadcrumb_last” property=”v:title”>([^<]+)<\\/span><\\/span>/’,
‘<span itemscope itemtype=”https://data-vocabulary.org/Breadcrumb”><span class=”breadcrumb_last” itemprop=”title”>$1</span></span>’,
$breadcrumbs
);
return $breadcrumbs;
}
add_filter(‘wpseo_breadcrumb_output’, ‘convertBreadcrumbsToMicrodata’);In my theme file I added this to output the breadcrumbs as links —
<?php if ( function_exists( ‘yoast_breadcrumb’ ) ) {
yoast_breadcrumb();
} ?>That gives me a set of breadcrumb links such as —
Home >> Category >> Page
Thanks,
Worthy
When I turned off — Datepicker Turned off under list Options — it fixed the problem.
Forum: Fixing WordPress
In reply to: Trying to Add Offset into Template PagesI was able to fix the issue a bit differently. I found a code on another site that I was able to implement in front of the loops on the template page.
I added this code to my functions.php file —
function my_post_limit($limit) { global $paged, $myOffset; if (empty($paged)) { $paged = 1; } $postperpage = intval(get_option('posts_per_page')); $pgstrt = ((intval($paged) -1) * $postperpage) + $myOffset . ', '; $limit = 'LIMIT '.$pgstrt.$postperpage; return $limit; }
Then I simply added this code on my page I was running the loop on —
<?php add_filter('post_limits', 'my_post_limit'); ?> <?php global $myOffset; $myOffset = 7; $temp = $wp_query; $wp_query = null; $wp_query = new WP_Query(); $wp_query->query('cat=1,3' . 'offset='.$myoffset . '&paged='.$paged); while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
That solved my issue with page pagination and offsets on an individual template page.
Forum: Fixing WordPress
In reply to: Trying to Add Offset into Template PagesWhat would be the reason my home page would now be offset by 7 on each category?
Forum: Fixing WordPress
In reply to: Trying to Add Offset into Template PagesThanks! Its so obvious! I can’t believe I didn’t see that! I was thinking it was a problem with calling the parameter is_page_template!
That solved the issue. Even the category that had an issue before loads without a hitch.
Plugin check if you want to look and try to replicate the issue.
Akismet
All in One SEO Pack
Google News XML Sitemap
HyperCache
iThemes Security
Jetpack
Jetpack Post Views
List Category Posts
MetaSlider
NextScripts: Social Networks Auto-Poster
Sharebar
Use Google Libraries
WordPress Mobile Pack
WP-PageNavi
WP Retina 2xWhen I first got the error, I assumed it was iThemes Security, however that wasn’t the issue.
Then I disabled HyperCache, thinking that was the issue, however that also didn’t fix the error.
The only one that I think could be directly related is Retina 2x if the mobile theme pulled retina images automatically.
Other than that, everything else shouldn’t affect the mobile theme.
I initially had ALL the categories checked (which is like 100), however I removed them all to a single category that doesn’t have any spaces / extra characters like – or . and the same error is shown.
If you go to https://www.worthynews.com on mobile, I’ve left the mobile pack on so you can debug.
I found this in the wordpress-mobile-pack/export/ folder. A snippet of the error log. Does this help?
[12-Jun-2014 16:09:00] PHP Fatal error: Uncaught exception 'LogicException' with message 'Passed array does not specify a callable method' removed-path-for-security/plugins/wordpress-mobile-pack/libs/htmlpurifier-4.6.0/library/HTMLPurifier/Bootstrap.php:117 Stack trace: #0 removed-path-for-security/plugins/wordpress-mobile-pack/libs/htmlpurifier-4.6.0/library/HTMLPurifier/Bootstrap.php(117): spl_autoload_register() #1 removed-path-for-security/plugins/wordpress-mobile-pack/libs/htmlpurifier-4.6.0/library/HTMLPurifier.autoload.php(11): HTMLPurifier_Bootstrap::registerAutoload(Array) #2 removed-path-for-security/plugins/wordpress-mobile-pack/libs/htmlpurifier-4.6.0/library/HTMLPurifier.auto.php(9): require_once('removed-path-for-security/pub...') #3 removed-path-for-security/plugins/wordpress-mobile-pack/export/export-class.php(4): require_once('removed-path-for-security/pub...') #4 removed-path-for-security/plugins/wordpress-mobile-pack/export/content.php(5): require_once('removed-path-for-security/pub...') #5 {main} thrown in removed-path-for-security/plugins/wordpress-mobile-pack/libs/htmlpurifier-4.6.0/library/HTMLPurifier/Bootstrap.php on line 117 [12-Jun-2014 16:09:29] PHP Fatal error: Uncaught exception 'LogicException' with message 'Passed array does not specify a callable method' in removed-path-for-security/plugins/wordpress-mobile-pack/libs/htmlpurifier-4.6.0/library/HTMLPurifier/Bootstrap.php:117 Stack trace: #0 removed-path-for-security/plugins/wordpress-mobile-pack/libs/htmlpurifier-4.6.0/library/HTMLPurifier/Bootstrap.php(117): spl_autoload_register() #1 removed-path-for-security/plugins/wordpress-mobile-pack/libs/htmlpurifier-4.6.0/library/HTMLPurifier.autoload.php(11): HTMLPurifier_Bootstrap::registerAutoload(Array) #2 removed-path-for-security/plugins/wordpress-mobile-pack/libs/htmlpurifier-4.6.0/library/HTMLPurifier.auto.php(9): require_once('removed-path-for-security/pub...') #3 removed-path-for-security/plugins/wordpress-mobile-pack/export/export-class.php(4): require_once('removed-path-for-security/pub...') #4 removed-path-for-securityplugins/wordpress-mobile-pack/export/content.php(5): require_once('removed-path-for-security/pub...') #5 {main} thrown in removed-path-for-security/plugins/wordpress-mobile-pack/libs/htmlpurifier-4.6.0/library/HTMLPurifier/Bootstrap.php on line 117
[Moderator Note: Please post log files between backticks or use the code button.]
I removed the line error_reporting(0);
I went to the URL and didn’t see a issue.
I removed the space between & dc etc
As I went to the site again,
I’m getting the same error, and the Type error is in app.extended.js:73418 if that means anything.
I’m using latest WordPress – 3.9.1
Thanks
– What’s the WordPress version your using? Notice, it should be 3.5+ — The latest — 3.9.1
– What was the previous version of WordPress Mobile Pack ? Was is 1.2.5 or 2.0? 2.0.1 — 2.0 was working fine, except ONE category couldn’t load.
– What was the browser you used on iPhone?
SafariOk I replaced the app.extended.js and opened Safari with iPhone User Agent set.
The error that comes back —
Get the url of my site /plugins/wordpress-mobile-pack/export/content.php?content=exportcategories& dc=1402584055610&limit=9&descriptionLength=300&page=1&start=0&callback=Ext.data.JsonP.callback1 500 (Internal Server Error)
TypeError: ‘undefined’ is not an object (evaluating ‘firstCategory.get’)
Thanks,
Worthy
Thanks!
Another aspect that I would love to incorporate into the plugin is the ability to track JetPack Statistics. You have the ability to track google analytics — however I prefer to use JetPack stats. Is this possible as well in an upcoming release?
Hi John,
It’s working now! I changed some settings and cleared out my page cache — W3 Total Cache and that seemed to do the trick! I’m not sure what settings I modified to correct it, but I’m not messing with it now that it’s working fine!
Thanks again for an AWESOME plugin!
Worthy
Ok John this is the problem. It’s the length of the URL I believe.
I have it installed on another site and it’s fine and when I shortened the URL to the domain name — it worked again.
The problem appears to be a long url.
https://www.domainname.com/category/category1/subcateory1/finalcategory1
Basically it’s sub-categories within the page that is causing the problem. Do you have a length setting in the URL insert?
Thanks,
Worthy