Forum Replies Created

Viewing 15 replies - 1 through 15 (of 32 total)
  • Forgot to add, make sure the child theme loop.php is actually in an includes subfolder…

    yourroot/wp/wp-content/themes/childtheme/includes/loop.php

    …or it won’t get used (the parent loop.php will get used instead).

    Getting rid of the tags/categories etc & moving the date is easy via custom css:

    For the tags, etc to disappear:

    .post-meta { display: none; }

    If they still don’t disappear, change it to:

    .post-meta { display: none!important; }

    For moving the date:

    .post-date, .post-title { display: inline; }
    
    .post-date { padding: 5px; border: 1px solid #000; }

    The inline is to get the date & title side by side. The padding & border is just an example of a simple box for the date.

    You can use the theme’s custom css area but it’s a pain to work in it. I highly suggest making custom css changes via a child theme. If you add/modify the theme’s files directly, they will be overwritten in the next update to the theme.

    Change the date format via the WP settings, not through the theme.

    Moving the thumbnail can be done by modifying the loop. I think this should definitely be done via a child theme AND with a test site first AND with a really good backup system in place. If you mess with php files, you risk breaking your site completely.

    If you are not familiar or comfortable with reading code, you probably shouldn’t be messing with the loop. If you want to dare anyways, try the following:

    In the child theme loop.php (seriously, don’t do this in the main theme file), cut these 2 lines AND everything between them (this block of code contains the call to the thumbnail):

    <?php themify_base_before_post_image(); // Hook ?>
    …more lines of code…
    <?php themify_base_after_post_image(); // Hook ?>

    then paste it all to underneath this line (which marks the end of the title coding):

    <?php themify_base_after_post_title(); // Hook ?>

    but before this line (which calls the rest of the post):

    <?php if ( ! is_attachment() ) : ?>

    When I use the HTML editor, it’s WYSIWYG.

    I even cut & pasted your above coding directly into my page to test & it rendered fine. The single quotes were preserved.

    From what I can tell of the plugin, it doesn’t actually do anything other than take what’s between the double quotes & clone that into HTML tags. I doubt the SU plugin is changing the quotes but WP has been known to do this & other automatic “corrections”.

    I’ve heard that future updates to WP itself will resolve the autocorrection problems. Until then, you’ll have to filter those out manually. The plugin can’t do anything if the quotes are changed by WP first.

    Is the option to correct nested XHTML on? That might be a problem.

    Otherwise, maybe try to stop wptexturize or see if you have some other sort of autocorrection function activated.

    I only have problems with code being changed on me if I use the visual editor. I don’t think the single quotes being changed is from the plugin itself.

    Just to clarify your “on top of that whole bunch of code” – you mean that you put the css declaration in the custom css settings page, saved it & then put the spoiler shortcode with contents in the html page/post editor, right?

    Things to check:

    1) Any custom css has to be the very last thing in order to overwrite the previous css. Anything that comes after will overwrite whatever went before.

    Likewise, any inline css will overwrite other internal css.

    So, try putting the custom change as the very last thing instead of the first thing.

    2a) Being as specific in your selectors is best too. You can try adding more specificity to ensure your custom css gets applied to exactly what you want.

    Using lots of very specific selectors is the best way of controlling custom css without mucking up other coding but can be the hardest to figure out.

    2b) You can check what is actually getting applied to what element by looking at your page with developer tools. This can tell you what is getting applied, overwritten and by what. You can also figure out element order/relationships.

    The selectors & order I used in my example was how the flow was on my page. You might need more selectors or more specific selectors if you have more elements.

    3) It may be that your carriage return isn’t generating p tags. The custom css isn’t going to be applied to any other tag. The WP default is to add p tags automatically but this can be turned off.

    4) Also, be sure you have cleared all caches to be able to see new changes.

    5) If there was an !important put in somewhere, you can’t override those until the !important is removed. You should be able to see if this was done via the developer tools.

    6) Double check that your theme or another plugin isn’t overriding your custom css. Since p tags are ubiquitous, themes have a tendency to want full control of them.

    Paragraph spacing is via the p tag. Changing just the p tag will change it everywhere.

    If you want to change just the paragraph spacing inside the spoilers only, you can add a custom class to the spoiler for p tags in spoilers only by being very exact in your selectors.

    Example:

    The CSS: .bigp > .su-spoiler-content p {margin-bottom: 5em;}

    This says for parent class .bigp, make all p tags in su-spoiler-content have this css.

    The spoiler shortcode: [su_spoiler title=”TITLE” class=”bigp”]Content

    New paragraph

    Next paragraph[/su_spoiler]

    Keep in mind that the spacing will be kept for every p tag in the spoiler, including the last one. If you want to change the very last p tag so there is more or less space between the last text & the bottom of the spoiler container, add something like this to the css:

    .bigp > .su-spoiler-content p:last-child {margin-bottom: 1.5em;}

    This should change the spacing under the last p tag only.

    I’ve been able to do this with a custom css class:

    .nolink { pointer-events: none; }

    [su_button class=”nolink]BUTTON DOES NOT WORK[/su_button]

    This may be inconsistent as some browsers don’t support css pointer-events.

    Hmmm…

    I played around with the shortcode & discovered this:

    If the url attribute is missing or not validly written, the button will default to the homepage automatically.

    If I put the a-href around the button, I get a hyperlink just to the left of the button. That a-href can work but looks like a blank spot which I only noticed because I have custom identifiers for links that adds an icon to the end of them.

    If the button AND the a-href both have valid urls, then the spot to the left of the button will go to the a-href url & the button goes to its url.

    I was able to get working buttons with absolute & relative urls, shortlinks & pretty permalinks, internal & external links. Other than the relative links, all urls were coded like

    [su_button url="http://www.blahblah.com/mypost/"]BUTTON[/su_button]

    Other thoughts:

    Have you tried with an external link? If the external link works, then your internal links might be getting redirected.

    I know my SEO has the option to redirect 404 pages & invalid links back to the homepage. This includes clicks on images, icons, etc. Could something like this be happening?

    If it still isn’t working, you can always try using the regular button html tag instead of the shortcode. You will have to do all the custom css for it yourself, though.

    I just remembered something:

    Are you using the customizer menu through the child theme or the parent theme? I remember having a conflict when I first switched to using a child theme.

    My leftover customization via the parent theme customizer menu was conflicting with changes I made via the child theme customizer menu. I fixed this by completely resetting the parent theme customizer menu back to default & only making changes through the child theme customizer menu.

    I do have more detailed custom css via separately enqueued stylesheets (more than just the child stylesheet) but still use the built-in theme customizer (via the child theme) to make the general font & colour changes.

    Could this be the cause of the flickering?

    Enqueuing stylesheets is here: http://codex.ww.wp.xz.cn/Function_Reference/wp_enqueue_style

    Not sure why enqueuing would do something to the Media Library. I haven’t had any issues with my Media library & enqueuing tons of stuff.

    Do you have a Media library plugin? Or just the default? I vaguely remember trying a Media library plugin once that had a lot of conflicts with other WP functions.

    It’s possible the underlying problem is a plugin conflict & it could be any plugin, not necessarily a plugin specific to the Media library or Google fonts.

    I don’t have any issues with Google fonts flickering regardless of whether caching is present or not. However, I only use about 5 different google fonts so I only have a few calls to the fonts api & minimal font changes as a result.

    This is probably due to either long load times for imported fonts (e.g. Google fonts) &/or you have multiple stylesheets loading & being rendered in sequence.

    I noticed in your other thread about child themes that you switched to using @import instead of enqueuing the parent stylesheet.

    I’m pretty sure this takes longer to load & results in a full load & render of each stylesheet separately – which can cause flickering as each stylesheet is rendered then changed when the next stylesheet is loaded & overwrites the previous styles.

    If you have any css loading in the footer, this can also cause visual changes as css loaded in the head will be rendered first then changed once the css in the foot is called & loads.

    I’m pretty sure you need to have the button url inside this shortcode to link the button, not around the button shortcode.

    [su_button url="yourURL" background="#bebde9" color="#fff" class="yourcss"]WhatTheButtonSays[/su_button]

    This button shortcode isn’t just for the button image. It has an attribute to take a url built in.

    Update to suggestion: Try disabling the visual editor.

    The single quotes will automatically get changed to double quotes if done in the visual editor or the visual editor is switched to at any time.

    The single quotes are actually preserved in my rendered pages but only if the coding with single quotes is done & saved via the HTML editor only.

    If you use the visual editor at any time, the single quotes will be automatically changed.

    @pankaj_vnt:

    Are you using the visual editor? If you are, stop.

    Do not view or type your code in the visual editor. It will automatically change the coding every time.

    Only use the HTML editor to code with single quotes.

    I did check my rendered pages:

    The single quotes are preserved within the double quotes once the page is fully rendered – if coded & saved via the HTML editor only.

    Any attempt to use the visual editor or switch back & forth between the visual & HTM editors would convert all single quotes to double quotes.

    Just testing using escape characters to display the coding without needing the _

    [su_tooltip title="<a href='http://example.com'>TITLE</a> content="<a href='http://example.com'>CONTENT</a> behavior="click" close="on"]

    sigh…just realised the [code] button in the editor

    I was able to get this to work in both the title & content attritubtes using the single quotes.

    I also had to add the behavior=”click” & close=”no” to keep the tooltip open to be able to click on the links in the popup or it just keeps closing automatically before the link can be clicked:

    [su_tooltip title=”<_a href=’http://example.com’>title</_a>&#8221; content=”<_a href=’example.com/’>content</_a>” behavior=”click” close=”no”]Check this out[/su_tooltip]

    I don’t think it matters that the rendering changes the quotes to double. The single quotes are just so the shortcode knows to accept the input between them & that it’s not the end of the attritute.

Viewing 15 replies - 1 through 15 (of 32 total)