No search results were found in Documentation!
Not using a child theme, nope.
That’s fine, thanks for your help so far!
are you using the child theme?
I’ve got to head out for about an hour. I can help more when I get back.
No, sorry I understand that.
Except, when I edited includes/modules/td_module_1.php, it did not work. So it may be the wrong file I’m editing. How do I know which file to edit?
Thanks
Ok, I’m sorry I didn’t pick up on the fact that you are trying to do this from the Theme Panel.
There is no way for you to change that in the Theme Panel(or anywhere in the wordpress admin). That is something that requires modification of the theme itself. The theme does not have an option for you to choose where to put the author box.
The instructions that I gave are for modifying the files that exist on your server.
That’s not worked unfortunately – thought I’m not 100% sure what you mean by ‘module 1’. Are you talking about on the category options within theme panel?
Article display is M2
Custom sidebar position is Defualt
Assuming you are using module 1, you would edit your includes/modules/td_module_1.php file.
Find the section of code that looks like this(mine starts at line 49):
if ($this->show_excerpt === true) { //module 7 uses this
$buffy .= '<p>' . $this->get_excerpt(td_util::get_option('tds_' . 'mod7_content_excerpt')) . '</p>';
$buffy .= '<div class="more-link-wrap wpb_button td_read_more clearfix">';
$buffy .= '<a href="' . $this->href . '">' . __td('Continue', TD_THEME_NAME) . '</a>';
$buffy .= '</div>';
} else {
$buffy .= $this->get_content();
}
$buffy .= '<footer class="clearfix">';
$buffy .= $this->get_post_pagination();
$buffy .= $this->get_review();
$buffy .= $this->get_the_tags();
$buffy .= $this->get_source_and_via();
$buffy .= $this->get_social_sharing();
$buffy .= $this->get_next_prev_posts();
$buffy .= $this->get_author_box();
$buffy .= '</footer>';
and replace it with this:
if ($this->show_excerpt === true) { //module 7 uses this
$buffy .= '<p>' . $this->get_excerpt(td_util::get_option('tds_' . 'mod7_content_excerpt')) . '</p>';
$buffy .= '<div class="more-link-wrap wpb_button td_read_more clearfix">';
$buffy .= '<a href="' . $this->href . '">' . __td('Continue', TD_THEME_NAME) . '</a>';
$buffy .= '</div>';
} else {
$buffy .= $this->get_content();
$buffy .= $this->get_author_box();
}
$buffy .= '<footer class="clearfix">';
$buffy .= $this->get_post_pagination();
$buffy .= $this->get_review();
$buffy .= $this->get_the_tags();
$buffy .= $this->get_source_and_via();
$buffy .= $this->get_social_sharing();
$buffy .= $this->get_next_prev_posts();
$buffy .= '</footer>';
Hello,
I would like to move the author box that can optionally appear on posts to directly underneath the post content.
As in, a line underneath the last word of the post content.
Please could someone advise!
I just looked at the source of the plugin again and there is a function that returns IDs! Yay!
So in lieu of that, you could try:
// Lets get the IDs of the co-authors
$user_ids = get_coauthors_IDs();
//Iterates through the user ids
foreach($user_ids as $coauthor_id){
//creates an author box for each of the coauthor ids
$buffy .= get_author_box($coauthor_id);
}
If this works, it will only work for co-authors that have an author account in your system that has a unique email address, not the pseudo ones that the plugin can create.
No, unfortunately it’s not that easy. It is looking weird because the coauthors boxes are being returned by the Co Authors plugin(using it’s own markup and styling), while the Author box is being returned by the Newspaper Theme’s functions(using different markup and styling). They are not interchangeable.
However, you can choose to use one or the other system in the template.
In your td_module_1(or whatever one, not td_module_blog) you could try replacing $buffy .= $this->get_author_box(); with:
// Get an array of all the co-authors
$my_coauthors = get_coauthors();
// Count the indexes in the array
if(count($my_coauthors) > 1 ){
// There is more than 1 index in $my_coauthors, output all of them with the coauthor plugin function
$buffy .= get_coauthors();
} else {
// There is only one Author, let's output that one with the Theme function
$buffy .= $this->get_author_box();
}
If you want the output of the Co Author’s plugin to look like the output of the Newspaper Theme Author Box, then you have some css work to do.
I think I’m getting very close to figuring this out, but not quite there…any suggestions much appreciated!
Here’s what we’ve got:
*I am using “Co-Authors Plus” that allows you to assign 2 authors to one post. This is an example: http://www.seattleglobalist.com/2013/12/30/an-elusive-japanese-new-years-treat-returns-to-seattle/18592 this post has two authors on the backend, but only one displays on the post.
*I’ve added template tags to functions.php, per these instructions. and I know it’s kinda sorta working ’cause I can get the two author names to show up (but looking totally weird) by adding a line:
$buffy .= get_coauthors();
to td_module_1.php.
*I *think* that I have to add some kind of conditional to this section of td_module_blog.php, to make this work:
function get_author_box($author_id = '') {
if (!$this->is_single) {
return;
}
if (td_util::get_option('tds_show_author_box') == 'hide') {
return;
}
if (empty($author_id)) {
$author_id = $this->post->post_author;
}
right?? like incorporating something here that says “if there are two authors for this post, then use the coauthors tag instead of the author tag”.
Is that possible?
Thanks!!
Hi,
I want to move comment box on all posts a little up. Now structure is:
post
sharing
previous/next
author box
similar articles
comments box
So I’d like to move commets box between previous/next and author box
How to do it? urgent
I noticed that the date box that is overlaid on the 2 column slider appears to be a pixel lower than the category box that it is right next to. This only happens to me on a Retina Macbook Pro.
I fixed the problem by editing the line-height attribute of CSS in media=”all” .iosSlider .slide-meta-author. I changed it from 28px to 29 px. I haven’t been able to confirm if this makes it too high on a standard display.
Also, does anyone know if it would be fairly simple to add the category and the date to the large image on the “Big Slide”?
Thanks!
Hello,
We have this on our todo list for the following updates, to make the author box(from posts) as a widget.
Thanks for the message!
I want to create a separate page with Authors Boxes in them but the Authors Box doesn’t show the bio or the social links. How can I change this?
In other words, I want the Authors Box to look the exact same as it does at the bottom of a post.
Thanks!
Chris
I am hoping to exclude authors with zero posts from the Authors Box module. Is that possible? Thanks!
http://www.seattleglobalist.com/about-the-globalist/who-we-are
The get_author_box() function is what Newspaper uses to display Author info on the front end. This function takes a single user ID and generates everything from that. After a quick glance at the code it looks like what needs to be done is to convert the output of the Co-Authors plugin to an array of IDs so that we can iterate over it to get the get_author_box() function to create the boxes using the Author IDs:
First, you would need something like this(assuming you have the Co-Authors Plus plugin installed) in the functions.php:
if(function_exists('coauthors')){
$coauthor_names = coauthors( null, null, null, null, false );
$user_ids = array();
function coauthor_names_to_ids(){
$names = explode(' ', $coauthor_names);
foreach($names as $name){
// We would probably need to add another function here to make sure that the $name matches any one of our authors slugs and then if $name == 'author-slug' then we could procede to get the ID and add it to the $user_IDs array so that we only have an array of valid IDs.
$user = get_user_by( 'slug', wptexturixe($name));
$user_ids[] .= $user->ID;
}
return $user_ids;
}
coauthor_names_to_ids();
}
And then all you would have to do get them to appear on the front end (in td_module_1 for example) is something like this:
//Iterates through the user ids
foreach($user_ids as $coauthor_id){
//creates an author box for each of the coauthor ids
$buffy .= get_author_box($coauthor_id);
}
I haven’t debugged this code, some work would probably need to be done to make sure the exploded $names array matches slugs properly but it appears to be one way to tackle the problem. Another would be to modify the Co-Authors plugin to be able to return the co-author IDs as well as links. I suppose you could also modify the get_author_box() function to accept the author name as an argument…
-
This reply was modified 12 years by
webmaster808. Reason: Forgot to call the function!
I think you can simply go to the theme customizer, and under posts, uncheck the show author box option under ‘post options’…
http://import.tagdiv.com/newspaper/doc/#theme-settings
•Post settings ◦show/hide featured image
◦lightbox for featured images, or link to picture or no link
◦show/hide tags
◦show/hide author box
◦show/hide next-preview posts
◦show/hide similar articles
◦similar article type: by category, by tag, by author
◦similar article count: 2,4,6 or 8 posts
◦show/hide breadcrumbs
◦show/hide home link on breadcrumbs
◦show/hide parent category link on breadcrumbs
◦show/hide article title on breadcrumbs
Hi, Radu
that would be awesome. I switched from using the child theme so as to not impact my pagespeed adventures, and so the custom CSS I put at bottom of style.css didn’t have an impact in the way the child/style.css did. Being able to tweak a few things here or there with either a custom.css file, or perhaps more appropriately these days a “hook” to drop some code in the head at bottom before the body tag (Woo Themes does this fairly well, btw; they have all these little ‘hook’ locations to drop in code, although it does add a slew of if/then crap; disclosure we’re trying to ramp up your theme to replace Woo Canvas!).
So for us to be semi-done and in full “go mode” my laundry list of stuff needed is simply:
1) Google async alignment in top bar
2) websafe fonts option – which would save me hacking that one
3) custom.css injection hook in head, to over-ride couple of minor things (like making the author box bio text size smaller, when making the post side larger so the author bio isn’t over-large from the base adjustment)
4) not critical; but option to have a local image for author box (add new user meta field for ‘author image’ — we used to do this on our in house theme, not difficult) to not pull gravatar and save some bandwidth from external site — if you wanted to wow the kids, you could add a “grab my image from gravatar” option 😉 Peeps love the “automagical” stuff.
Otherwise, for us — you’re done! I’m hoping the v3 won’t introduce new issues, but right now we’re very happy.
BTW: for ‘web safe’ fonts, Adobe came up with some really quite brilliant ‘stacks’ of the best font mix to use across Mac, Windows, iOS, Android, et al. They can be found in Dreamweaver, and possibly their help system – but if you need those, just let me know. Much nicer than the old skool ‘Helvetica, arial, sans-serif’ stack. 🙂
Pagespeed mod test update: settings 0.4
Google Pagespeed 93/100 on main GPS Insight
page: http://ga-ga.com/1262/fiction-area-code-666-part-18-del-arton/
– google adsense – no ads for test
– addthis plugin replace social media buttons with single button ‘on’
– gravatar loaded dynamic over network for author box
todo:
1) load author image locally either with plugin, or add field to functions.php to add new user datafield, then call user meta for the field instead of gravatar code.
2) reduce server response time — typical is 0.32 seconds (320msec) up to 4 seconds; but Google now saying <200msec is the “ideal” — not sure tradeoff on optimizations for everything else; but I did see a post the other day about server tweaks to speed up “first byte” load of WordPress pages to deal with that so called “error.” Solving this would negate the penalize from Google AdSense being on.
3) super annoying “reder blocking” CSS almost “quashed” and ironically the error is from mod_pagespeed trying to fix:
Optimize CSS Delivery of the following:http://ga-ga.com/…ootstrap.css.pagespeed.cf.n0P3fhMJJz.css
http://ga-ga.com/…/A.style.css.pagespeed.cf.JAYrGYtjNo.css
– so in typical GPS fashion, one Google product complains about another Google product which is designed to fix the complaint in first place (ARGH!). This one will take some playing around with the “filters” which is where I got stuck this past weekend.
Hope this is entertaining somebody 🙂
and I forgot to mention here is the code I’m using in my htaccess file for mod_pagespeed testing, in addition to CoreFilters being on from the main .conf file at server level, eventually this would be a <directory> directive in the .conf and not in htaccess for better optimization.
<IfModule pagespeed_module>
ModPagespeed on
ModPagespeedEnableFilters collapse_whitespace
ModPagespeedEnableFilters move_css_to_head
ModPagespeedEnableFilters combine_css
ModPagespeedEnableFilters remove_comments
ModPagespeedEnableFilters rewrite_images
ModPagespeedEnableFilters insert_dns_prefetch
</IfModule>
CHANGE to my prior htaccess code for expire headers to solve one javascript file for comments in the core wp code:
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>
I also added these to the end of the htaccess after the cache control headers, to solve the ETag problem and also the damn spammers hitting my ping script.
<IfModule mod_headers.c>
Header unset ETag
</IfModule>
<IfModule mod_alias.c>
RedirectMatch 403 /xmlrpc.php
</IfModule>
AS EVER: do not make changes to any of your files/settings unless you have backups done.
THis is all experimental at this point; when I have a solid Apache-friendly setup, I will share all the settings in all the files for those interested in this discussion. 🙂
Cheers,
Christopher Simmons
member: PRSA, ASCAP
CEO, Neotrope®
Torrance, CA, USA
(please don’t call me asking for help on anything at this point in time; I will resume my consulting biz once I have my own ducks back in a row, as it were!)
-
This reply was modified 12 years by
simchris.
OH:
in case anybody is curious about my misadventures in
JANUARY TWEAK FEST
– tagdiv speed booster to enqueue stuff
– google font calls removed from functions.php; style.css mod to change default fonts to:
font-family:Segoe,"Segoe UI","DejaVu Sans","Trebuchet MS",Verdana,sans-serif
– mod_pagespeed corefilters on, layz load images off until page load
– manual mod_pagespeed “switch on” via htaccess to test impact
– optimizations in htaccess (remove “collisions” for typical mod-deflate call, taken care of by mod_pagespeed)
– optimizations in wp-config.php
– optimizations in functions.php
using GTNetrix for the testing right now
(6pm PST 1/16/14)
http://gtmetrix.com/reports/ga-ga.com/MJRvlvaL
TESTING THIS PAGE:
http://ga-ga.com/518/discwatcher-blu-ray-movie-review-prince-of-persia-the-sands-of-time/
mix of images, thumbs, youtube video, addthis social button, aysnc google ad
GTMETRIX ENGINE SCORE with my “0.03 settings” I’m up to tonight
98/PS and 82/YSLOW
Page load time: 2.30s
Total page size: 1.02MB
Total number of requests: 53
I AM NOT USING ANY WP CACHING PLUGIN, NOT USING ANY MINIFICATION PLUGIN; beyond mod_pagespeed and server side functions for these tests.
With the main Google PageSpeed Insights page,
score is: 89/100 desktop and 77/100 mobile
Oddly for current Google main speed testing, turning ads off completely along with turning author box off to remove gravatar pull, also didn’t actually increase initial rank. Nor did turning off the addthis button. More testing underway!
A page without youtube video, with addthis on, google advert off, author box on for live gravatar ( http://ga-ga.com/492/growing-older-in-a-youth-oriented-society/ ) ; pagespeed 91/100 desktop and big jump for mobile to 83/100. YouTube really is a suck for the PS rank.
If you look at my code you can see i manually inserted share buttons and a facebook comment box. I’ve added them below the content, but author box and all will automatically show up below the facebook comment box. So i had to manually call the author box and other footer items and manually place them above the facebook comment box and share buttons. I only showed how to create and instance for the footer items so you can manually place them anywhere you want.
Not sure why you would want to put the author box after the comment box, but you should open a new thread for that as it’s different from what I was trying to accomplish.
Well the author info and tags will show up beneath my share buttons and comment box, but i manages to create a new instance for next_prev_post, source_and_via etc.
So it will look like this `function custom_source_via(){
global $post;
$test_module_inst = new td_module_1($post);
$source_via = $test_module_inst->get_source_and_via();
return $source_via;
}
function custom_author(){
global $post;
$test_module_inst = new td_module_1($post);
$author = $test_module_inst->get_author_box();
return $author;
}`
“Suggestion for adding if single in frond of the ads code? It prevents ads from showing up on category pages, the homepage and other pages”
The advertisement only shows up on the homepage for me and I hide it using CSS.
“Is it possible to add author info and tags to this function? Because all things in the footer like tags, source and author info will show beneath the sharing buttons and comment box.”
No the author info and tags will show above the comment box and under the content.
Is it possible to add author info and tags to this function? Because all things in the footer like tags, source and author info will show beneath the sharing buttons and comment box.