Rado
Forum Replies Created
-
Forum: Plugins
In reply to: [WP Super Cache] Preload stopped working all of the sudden, no changes made….Now that i’ve reinstalled the plugin when i try to enable preload and i hit save changed it jumps back to the default settings, what could be wrong? Why can’t the plugin write to the database? The debug is giving me nothing… i can save settings for all other stuff except preload.
Forum: Plugins
In reply to: [BJ Lazy Load] Front page images not being lazyloadedsolved !
$img_html = '<a href="' . get_permalink() . '" title="' . get_the_title() . '"><img src="' . catch_that_image() . '" alt="' . get_the_title() . '"></a>'; $img_html = apply_filters( 'bj_lazy_load_html', $img_html ); echo $img_html;
Forum: Plugins
In reply to: [BJ Lazy Load] Front page images not being lazyloadedi need to learn how to mix php and html, i usually can do it but in this case i’m already inside an if statement not sure if that matters, but this will not render:
<?php if ( get_the_post_thumbnail($post_id) != '' ) { $img_html= ?><a href="<?php the_permalink(); ?> <img src="<?php catch_that_image(); ?>" alt="<?php the_title(); ?>"></a><?php ; $img_html = apply_filters( 'bj_lazy_load_html', $img_html ); echo $img_html; }
any help appreciated ??
Forum: Plugins
In reply to: [BJ Lazy Load] Front page images not being lazyloadedsorry i’m not very good with php, can you explain why this code won’t work
echo $img_html= '<a href="'; the_permalink(); echo '">'; echo '<img src="'; echo catch_that_image(); echo '" alt="'; the_title(); echo '"></a>'; $img_html = apply_filters( 'bj_lazy_load_html', $img_html ); echo $img_html; }
catch_that_image does bring back the full url of feature image if available otherwise replace it with a static one:
function catch_that_image() { global $post, $posts; $first_img = ''; ob_start(); ob_end_clean(); if( $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches) ) { $first_img = $matches[1][0]; } if(empty($first_img)) { $first_img = "/staff.png"; } return $first_img; }
It’s probably something broken in my first code!
Forum: Plugins
In reply to: [BJ Lazy Load] Front page images not being lazyloadedok pretty sure i found the issue, the images grabbed for the front page are not actually within the $get_the_content , they are being put outside, does this matter?
i tried to add style=”display: inline;” class=”lazy data-lazy-ready” to all the front page images to see if the plugin would detect them then as it seems to add this code for the single pages but that didn’t work either, ideas welcome!
Forum: Reviews
In reply to: [OnePress Social Locker] Plugin Doesn't WorkSame problem here, its broken, ive checked more sites that already have it “working” and nothing is being shared on facebook or google , i’m guessing both api’s have had changes
Forum: Plugins
In reply to: [OnePress Social Locker] Facebook like doesn't workcan confirm, have tested with 2 wp test installs, neither google + or facebook does anything, the links will appear when you click like / +1 but there’s no data on either facebook or google+ , twitter is the only thing working at the moment.
Can also confirm that the site provided from op : https://livelifeloveloes.com/fabric-and-tailors/
does have the same bug i explained, i clicked “like” got access to the content but i check my temporary facebook account there’s nothing there.
Forum: Fixing WordPress
In reply to: is_tag array && !is_single can't get it to work…i had been working for 12 hours, i took a break and came back and quickly realized my statement had errors ??
Forum: Plugins
In reply to: [Multi-column Tag Map] Exclude tags by ID?exclude doesn’t even work via id or via text-space, not sure what the plugin author was thinking here, hmmm
Forum: Fixing WordPress
In reply to: Display related post from same category only, need some help!fixed it myself
‘category__not_in’ => array (171, 12, 122, 13, 16, 14),
workedAlso another thing i’ve noticed is that previously zipped database jobs from old working plugin zipped the .SQL file directly into the zip file, the new version zips it into a huge amount of sub directories like this:
backup-mysite-f-1406024046-2lHDc3215w.zip
Inside: \Websites/WP/Wp-Content/Uploads/ithemes-security/backups/backup-mysite-f-1406024046-2lHDc3215w.sql
What the hell? Normal windows zip extraction does not understand the \Websites folder so it becomes an empty zipfile, but using 7zip or winrar shows that there’s folders and sub folders with the entire path leading to the sql file.
Thank you alchymyth, incredible fast help!
That was pretty much exactly what i wanted! Thank you very much, just one follow up question, how can i implement the spacer between the tags like in :
<?php the_tags('Tags ',' ? ','');?>
With your code?
I’ve added ? to the end of the href in your code but that puts me where it renders the dot at the end of every tag and it would look nice if the last tag didn’t render the dot.
Any ideas?
Turns out after scratching my head for a hour it was my browser cache which had bugged out, cleared it before just in case but even a restart would not properly clear it, i tested another browser and it worked, went into firefox profile folder, deleted it and restarted and it works, sigh.
Forum: Plugins
In reply to: Writing my own Related Posts in function.php, need some help… rookie warningthis worked for me `$args = array(
‘tag__in’ => $tag_ids,
‘post__not_in’ => array($post->ID),
‘posts_per_page’=>4,
‘caller_get_posts’=>1,
‘orderby’=>’rand’
);
$the_query = new WP_Query( $args ); `