Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter JHaleavy

    (@jhaleavy)

    Hello, thanks for the advice.

    thespeaker.co

    The theme is custom. It is very basic php/css. A very small amount of js.

    I’ll check the plugins.

    Thread Starter JHaleavy

    (@jhaleavy)

    Hi, just a follow up on this conversation. Something I’ve been thinking about a since reading your solutions.

    All these solutions sound great, btw, thanks. I think I will use the css options mentioned above.

    I wonder about time to load with these options though. I guess I could just use a special css file for category pages, to just add things to those pages.

    For the single post view though, I would like to display some custom styling based on the lowest category (most child) checked.

    What amount of time would it take (page load time) to add css to style the look of a few hundred (eventually — not now) categories? For example, to add a special background to single posts based on their most child category…

    How could I tell my css to recognize a page based on its lowest (most-child) category, and then have it use the right style?

    Thanks, JH

    Thread Starter JHaleavy

    (@jhaleavy)

    Maybe there is something I can add to the functions.php to frame the code entered so it will understand it?

    Thread Starter JHaleavy

    (@jhaleavy)

    That worked absolutely. I feel kind of dumb but very thankful for explaining that.

    It’s also very interesting to see how WordPress works in a malleability sense. Thanks!

    Thread Starter JHaleavy

    (@jhaleavy)

    Hi, thanks.

    So how do I do that, for example, please?

    In my single.php I open the file with

    <?php
    /*
    ...
    */
    
    get_header();
    
    if (function_exists('add_theme_support')) {
      add_theme_support('post-thumbnails');
      set_post_thumbnail_size(150,150);

    etc…

    And then my header begins this way:

    <!DOCTYPE html>
    <html <?php language_attributes(); ?>>
    	<head>
    		<meta charset="<?php bloginfo('charset'); ?>">
    		<meta name="viewport" content="width=device-width">
    		<title><?php bloginfo('name'); ?></title>
    		<?php wp_head(); ?>
    		<script type="text/javascript"> var c = document.getElementById("article"); function resizeText(multiplier) { if (c.style.fontSize == "") { c.style.fontSize = "1.0em"; } c.style.fontSize = parseFloat(c.style.fontSize) + (multiplier * 0.2) + "em"; } </script> <script type="text/javascript"> jQuery(document).ready(function($) { $('.open-popup').click(function(e) { e.preventDefault(); window.open(this.href, '_blank', 'width=800,height=600'); }); }); }(jQuery)); }); </script>
            <link rel="shortcut icon" href="<?php echo get_stylesheet_directory_uri(); ?>/favicon.ico" />
     </head>
    
    <body { height:100%} <?php body_class(); ?>>

    But how do I take what’s in the header.php and paste it into the single (like what do I remove. I can’t just replace the single.php’s <header> line with all the code from header.php — I must have to do something a little differently).

    In this case, I am trying to build an entire single-post layout on one page. I use the standard WordPress functions for most everything else. It’s complicated, but I’m working with internal css and things.

    Thread Starter JHaleavy

    (@jhaleavy)

    Even that is very good to know, because it tells us what we DON’t need to try to do. Thanks!

    Thread Starter JHaleavy

    (@jhaleavy)

    Thanks for that explanation.

    That might mean then that I can change the code of the plugin to load where I want it to load?

    Could you please point me in the direction where that exists for plugins usually and what the code looks like?

    I understand plugins that affect display in many cases need to be loaded first, but we are coding up our own Theme, and don’t need any but maybe one or two of our plugins to load there.

    I had the same.

    I tried about 4 or 5 other plugins in attempts to migrate. None work, so its the new WordPres.

    Thanks, WordPress! You’ve caused us all major problems here.

    Thread Starter JHaleavy

    (@jhaleavy)

    Hi, thanks guys. In this case I’m building a Theme myself.

    What bemdesign wrote about applying to style all posts within a category with css is very interesting.

    In this case, I have categories and child categories made (several levels deep), and they have posts. All I would really like to do is add a special image to the header on the category_page for, for example, Cell Phones (child category of Tech). Or, if I find an image, add an image to the category_page for 3D Printing. But most categories don’t have images yet, so they would just display without any image in the header space. I’d like to do this keeping in mind initial page load speed (so I want to put it in after the onload event).

    It would also be interesting to add the same image to single-posts within the category, though that seems a second piece of code.

    Thanks

Viewing 9 replies - 1 through 9 (of 9 total)