Speakers on homepage

Best WordPress theme for festivals or other events with responsive, clean and unique design.
GK User
Tue Sep 17, 2013 9:13 pm
Hello!

I'm trying to display my blog articles on homepage with speakers widget but i didn't work!

It is possible to display any category articles on this widget instead of speakers or not?

Thanks

(sorry for my bad english i'm french)
User avatar
Fresh Boarder

GK User
Wed Sep 18, 2013 7:24 am
Hi,

This widget is generally dedicated only for Speakers custom post type.

I think, that you can edit Fest/gavern/widget.speakers.php file and edit this line
Code: Select all
$gk_loop = new WP_Query( 'category_name=' . $category . '&post_type=' .$options_tmp['name']);


Removing this fragment
Code: Select all
. '&post_type=' .$options_tmp['name']
should help, but I didn't tested it.. And probably you will have to improve some CSS styling of the featured images.
User avatar
Moderator

GK User
Wed Sep 18, 2013 8:03 pm
OK create or improve css files will be difficult for me!

Maybe i have an other solution, i can create my articles in speakers, but it's possible to choose which one i want to display in my "speakers page" to display only what i want and keep my articles for the homepage widget?
User avatar
Fresh Boarder

GK User
Wed Sep 18, 2013 8:35 pm
Yes, you can create speakers (first create new speakers category), and then in GK Speakers widget you can choose only this specific category as a data source.
User avatar
Moderator

GK User
Thu Sep 19, 2013 9:44 am
That's what i do! I create a category named "news" and the other one named "speakers". My news are displayed in speakers widget on homepage, th'ats good, but in my "speakers page" i see my news too!!!
I would like to see only my speakers in my "speakers page", it is possible?
User avatar
Fresh Boarder

GK User
Fri Sep 20, 2013 8:46 pm
You created these categories in Speakers custom post types, right? Could you provide an URL to your website? (here or via PM). It should works without any problems..
User avatar
Moderator

GK User
Fri Sep 20, 2013 10:10 pm
Ok i send you website and code, thanks
User avatar
Fresh Boarder

GK User
Sun Sep 22, 2013 7:48 pm
Ok, Now i understand, I thought that you are using 2 GK Speakers widget and in this case there would be no problem to display different speakers category in each widgets.

But your category speakers page displays all custom post type (speakers and news), so you have to edit your Fest/category-speakers.php file and change this line:
Code: Select all
$args = array( 'post_type' => $tmp['name'], 'posts_per_page' => 100 );

to
Code: Select all
$args = array( 'category_name' => 'speakers', 'posts_per_page' => 100 );
User avatar
Moderator

GK User
Mon Sep 23, 2013 10:41 am
Thanks man it works!!!!

I have others questions:

- My news images displayed in speakers widget on homepage are wired!!! I think there is a problem of radius somewhere but i don't find it?

- Is it possible to remove links on speakers in "speakers page"? I want to show them but we don't need anything else?

- And the last thing but i think a good one! To show my news on homepage in speakers widget i need to published my news in speakers mode, but when we open a news, it not look good. Is it possible to remove the icone of speaker at the top and made an article like a normal blog article?

Thanks for your help by advance!
User avatar
Fresh Boarder

GK User
Tue Sep 24, 2013 8:44 am
1. The width and height of the featured image should be the same (it's a circle)

2. edit content-speaker.php file and remove anchor, this fragment
Code: Select all
<h2>
      <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', GKTPLNAME ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a>
   </h2>
replace with
Code: Select all
<h2>
      <?php the_title(); ?>
   </h2>

If you don't want to link on images too, do the same with <figure class= "featured-image"> (leave only the_post_thumbnail function inside)

3. Try to add this code to override.css file (first enable this option in template options -> advanced tab), but you also loose this appearance for other single speakers page:

Code: Select all
.gk-speaker-single .featured-image {
display: none;
}
User avatar
Moderator


cron