WordPress.org

Support

Support » Themes and Templates » [Resolved] Pages in highlights and smaller featurette image

[Resolved] Pages in highlights and smaller featurette image

  • Hello,

    I am curious if there is a way to get pages to appear in the highlights section? You previously mentioned a method by adding a line of code above line 16 in the featurette.php file, but that did not seem to work (which I mentioned in that post but never got a response, so I figured I would start a new one). Anyhow, can you let me know if there is a method?

    Also, is there a way to make the featurette images appear smaller on the home page, in the home page file i believe it references the large size image and I was hoping to get this down to a smaller size.

    Many thanks for all your help and for a great theme!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Whoops I meant to say I edited the Highlights.php file for the page addition, I accidentally said featurette.

    Sorry!

    Hi,

    Havent heard anything back, but I wanted to add in another question. Is there a way to align the featurette area so that the circles and text are centered? rather than aligned left as they are now?

    Thanks!

    Theme Author eminozlem

    @eminozlem

    Hi, sorry for the delayed response. I agree it may come handy to display pages in modules (highlights,carousel,feat etc). It will be added it in next release.

    You can simply add pages to query args by adding one line, open ./inc/eo/theme-functions.php and see eo_get_post_types() function.

    You need to add:
    $post_types_neu["page"] = "Pages";

    So that this function around line 308:

    function eo_get_post_types() {
    	$post_types = get_post_types( array( '_builtin' => false, 'publicly_queryable' => true ) );
    	$post_types_neu = array();
    	foreach($post_types as $post_type) {
    		$post_types_neu[$post_type] = ucfirst($post_type);
    	}
    	$post_types_neu["post"] = "Posts";
    	return $post_types_neu;
    }

    Will look like this:

    function eo_get_post_types() {
    	$post_types = get_post_types( array( '_builtin' => false, 'publicly_queryable' => true ) );
    	$post_types_neu = array();
    	foreach($post_types as $post_type) {
    		$post_types_neu[$post_type] = ucfirst($post_type);
    	}
    	$post_types_neu["post"] = "Posts";
    	$post_types_neu["page"] = "Pages";
    	return $post_types_neu;
    }

    And pages will be available in all modules.`

    <blockquote> Remember that default post_type is only set to display posts but not pages.</blockquote>
    http://codex.wordpress.org/Class_Reference/WP_Query

    About centered text; it should be centered already by default.

    #highlights {
        text-align: center;
    }

    Remember to use child themes for modifications to core files. Marking as resolved, let me know if you have further questions.

    Thank you so much! This worked great.
    However, there is one last thing, is it possible to make the featurettes image display smaller on the home page?

    Theme Author eminozlem

    @eminozlem

    Sure, i dont see why not. You can add a particular image size, but you have to regen the thumbs after.

    See:
    http://codex.wordpress.org/Function_Reference/add_image_size
    and
    https://wordpress.org/plugins/regenerate-thumbnails/

    Or you can simlpy use css to make it smaller

    Thanks so much! One quick thing, the code
    #highlights {
    text-align: center;
    }
    Only centers the text, but not the image. Is there some CSS I can use to center align both? I feel like I have tried everything and cannot get the image to align properly as well. Thanks!

    JM

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] Pages in highlights and smaller featurette image’ is closed to new replies.