WordPress.org

Forums

Bootstrap Ultimate
[resolved] Pages in highlights and smaller featurette image (7 posts)

  1. Jmcmillan7
    Member
    Posted 1 year ago #

    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!

  2. Jmcmillan7
    Member
    Posted 1 year ago #

    Whoops I meant to say I edited the Highlights.php file for the page addition, I accidentally said featurette.

    Sorry!

  3. Jmcmillan7
    Member
    Posted 1 year ago #

    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!

  4. eminozlem
    Member
    Theme Author

    Posted 1 year ago #

    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.

  5. Jmcmillan7
    Member
    Posted 1 year ago #

    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?

  6. eminozlem
    Member
    Theme Author

    Posted 1 year ago #

    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

  7. Jmcmillan7
    Member
    Posted 1 year ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic