WordPress.org

Ready to get started?Download WordPress

Forums

Spun
featured images not showing inside circles in custom template (15 posts)

  1. sulfdag
    Member
    Posted 1 year ago #

    Hello Caroline and Spun users,

    based on some earlier threads, I created a new page template and was able to get it to show only the pages I need as circles.

    But when a new template is created the "featured image" is not showing inside the circle as the original index.php would work.

    instead its showing the whole image.

    and I have not changed anything except for the argument codes which allow choosing specific pages to display.

    $args = array(
    'post_type' => 'page',
    'post__in' => array(2,67,173) #page id numbers go here!
    );
    query_posts($args);

    I am not sure what I might be missing or what i need to do to get it to work. switching back to the default template everything works fine (featured image is inside the circle) but when using the default template, as stated above, the image just shows up in its full glory.

    any ideas/suggestions as to how this could be sorted?

    Much Thanks to Caroline for a great theme! and to Andrew and WPyogi for helping out so far.

    Cheers,

  2. sulfdag
    Member
    Posted 1 year ago #

    Also the styling of the new custom php is different since the circles appear larger in it compared to the circles in the default template.

    so im thinking, does new styling commands have to be written when using a new template for a page?

    any help is much appreciated.

  3. sulfdag
    Member
    Posted 1 year ago #

    could anyone please comment on this? the main issue is that the circles in spun theme does not behave the same after a custom template is created. would greatly appreciate some direction on this!

    Thanks!

  4. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Sounds like the CSS may not be being applied to the new page. You could try looking at the regular template page and the custom template page - using Firebug to see what's going on with CSS in one vs. the other.

  5. sulfdag
    Member
    Posted 1 year ago #

    ok Thanks!

  6. sulfdag
    Member
    Posted 1 year ago #

    WpYogi, just to confirm, the style sheet is supposed to effect each page without regard for default or new templates right?

    as posted above the only change i made to the original index.php
    was to add this

    $args = array(
    'post_type' => 'page',
    'post__in' => array(2,67,173) #page id numbers go here!
    );
    query_posts($args);

    havent checked both the templates line by line with firebug yet but will do so.

    Thanks again

  7. Andrew
    Forum Moderator
    Posted 1 year ago #

    Let's see the webpage with the issue.

  8. sulfdag
    Member
    Posted 1 year ago #

    page link

    Andrew this is the link with the home page and the "bows" page using a custom template.

    you can see how the "featured image" shows up fully instead of inside the circles.

    If I make the home page use the default index.php then the featured images appear inside circles as supposed to.

  9. sulfdag
    Member
    Posted 1 year ago #

    I think the get_template_part has something to do with it

    have not looked into the css or the new templates properly yet but by tomorrow night i'll share if any progress has been made if not bug you two again about it =)

  10. Andrew
    Forum Moderator
    Posted 1 year ago #

    You may want to first set up a Child Theme and transfer all the changes you made to the CSS file into your Child Theme style.css file.
    For any PHP changes, first copy the file you want to modify and paste it into your Child Theme directory. Then edit that PHP file (from within the Child Theme).

    Then you'll have a much easier time identifying why your theme isn't working properly & your changes won't be lost when the theme updates.

  11. sulfdag
    Member
    Posted 1 year ago #

    Andrew, Ok Will do that. Got into enough of trouble messing with a modified theme so will give that a shot.

    Thanks,

  12. sulfdag
    Member
    Posted 1 year ago #

    Andrew/WpYogi.

    fyi only yesterday i realized the importance of starting off with child themes and why its not advisable to start swimming in the deep end of the pool!

    site is set up and will be looking at the css differences till i can figure out which styling code is causing it. the new home page template is still not showing the featured image within a circle but i have a clearer layout now to make changes and not lose track of them.

    Thanks!

  13. sulfdag
    Member
    Posted 1 year ago #

    i set up a child theme and setup the site here

    There is a HOME page with the default index.php and the Custom HOME with the new template. whats bugging me is that I only added this arguement
    $args = array(
    'post_type' => 'page',
    'post__in' => array(2,67,173) #page id numbers go here!
    );
    query_posts($args);
    and it works well for the index.php but when displaying it in the custom template it doesnt work.

    looking at the style.css it became apparent that somehow the thumbnail isnt registering the same for the index.php and the custom template.
    The default template seems to use the homepage styling (lines 770/828)
    while the custom template shows that the pages/featured images use (848/864 of style.css). this is under "sticky content" in the original style.css.

    I played around with get_the_post_thumbnail
    but that merely displayed the image again (inaddition to the full featured image).

    get_template_part( 'content', 'home' );

    so is there someway that the content-home.php is causing this? I'll keep at it and see what I can find but im just baffled as to how to direct the custom template to act the same as the default one. Any advice would be greatly appreciated!!

    Cheers and Thanks for taking the time to read through this issue!

  14. sulfdag
    Member
    Posted 1 year ago #

    i think im narrowing down on it. is it a issue of trying to have dynamic content on a static front page

    sounds more like whats going on here but would still need help figuring out what to do about it =)

  15. sulfdag
    Member
    Posted 1 year ago #

    I realized I dont HAVE to use this to develop a decent basic site.
    so im working around not banging heads with he issue at this point.

    should appreciate what we have so THANKS a BUNCH Caroline for sharing this elegant and stylish theme.

    Thanks WpYogi and Andrew for your help so far. would still like to understand if its an inherent problem or whether there is a way to fix it though. so if someone knows how to deal with it please share!

    Regards,

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.