Forum Replies Created

Viewing 15 replies - 1 through 15 (of 19 total)
  • Thread Starter janneval

    (@janneval)

    GOT IT! FOUND IT! THAT’S IT!!!

    It’s as simple that you just need to create more than one post in your custom post type. Then you get the menu to choose one for parent to another. If there is only one post, there’s nothing to add as parent for it. Thus the whole drop down menu is not even shown!

    Thank me. Good job. ??

    Thread Starter janneval

    (@janneval)

    I did it! IT WORKS!!

    No need to make any of that complicated thing I explain above, nothing! It’s very simple. (after hour of research it really feels almost too simle!) I just noticed that wpautop() does not add a p-element for an object element. So I replaced my div element by an object element. Perfect!

    So here is output of my shortcode:

    <p>Text text text text text text text
    <object style="display:inline-block">STUFF-INSIDE</object>
    text text text text text text text</p>

    Thanks Mohsin for a tip!

    Thread Starter janneval

    (@janneval)

    I see. It’s getting bit tricky now. Because if I disable the whole filter, it brings other problems. In general the filter is very useful and needed, because otherwise there is no p-tags in text users write. Not to use it at all is probably worse than bearing single problem it creates.

    However, what I could try is to disable this filter and then make my own similar filter to be used instead. And my own filter I could make by copying the original filter code and then making the necessary changes to it.

    (So practically this would do the same as editing the original filter, but to edit WP core code is always a bad idea.)

    Let’s see if it works! I’ll come back to report you when I have time to try it. Thank you for your advice, Mohsin!

    Thread Starter janneval

    (@janneval)

    Thank you so much Andrew for your patience and help! It’s really such a wonderful thing to have your developer mates helping over personally. Really appreciate! Keep going, good job!

    I’ll start another support topic about this since this one is getting too long and not very helpful for others to follow. Problem is still unsolved.

    Here is the new support request on the same topic:
    https://www.ads-software.com/support/topic/how-to-override-the-automatic-corrections-wp-makes-to-html?replies=1#post-7628283

    If I could, I would just remove this fully. Not very useful to read to anyone. Moderators, please, remove this whole support request!

    Thread Starter janneval

    (@janneval)

    I’m building a custom theme and the shortcode is in a file the theme loads in its header. I guess practically it’s the same. If it would be in a plugin, it would be also loaded in the header, isn’t it?

    Thread Starter janneval

    (@janneval)

    This is bit embarrassing.. I just found out that it was not the css at all. It is that WP is filtering the content and making changes to the html code. I don’t know how I didn’t notice it though I went through the code several times!! Sorry for that!

    So when I write this in the editor

    text text [my-shortcode] text text

    ..WP (+ my code for the shortcode) is supposed to output html code like this

    <p>text text <div style="display: inline-block">
    SOME CONTENT</div> text text</p>

    ..but instead WP outputs html like this !!

    <p>text text</p>
    <div style="display:inline-block">SOME CONTENT</div> text text
    <p></p>

    Not the first time getting trouble with the WP’s automatic “correction”. Mostly it, of course, makes good things, which is to correct human mistakes. But in this case it creates mistakes.

    How to go around this automatic “corrections”?

    THIS IS REALLY QUITE ANNOYING! I do LOVE WordPress, but not every single bit of it.

    Thread Starter janneval

    (@janneval)

    That would be more tricky to make, since the div is created by a shortcode. Shortcode is in a post/page text and User is adding it in the WP-text editor. For example:

    text text text text [my-shortcode] text text

    I could of course think of making the whole text chapter out of shortcode but that would be bit messy. Like this:

    [my-shortcode before=”text text text text” after=”text text”]

    Plus, in that case there could be only one shortcode in each chapter.

    Thread Starter janneval

    (@janneval)

    Then it breaks it even more, surprisingly. If I make this:

    <p>text text text text <div style="display: inline;">SOME-CONTENT</div> text text text text</p>

    …it becomes like this:

    text text text text

    SOME-CONTENT
    text text text text

    So not only the text is cut before the div but also after the rest of the text goes to the next line.

    Thread Starter janneval

    (@janneval)

    Yeah.. thats what I tried to do, look though the code, but then I tired of it and found a better way: I simply deleted one by one plenty of those files which I didn’t understand. :))

    Before doing it I added to the beginning of each file something like <strong>echo 'This is index.php.';</strong> where index.php was replaced by the name of that file where I added it. Then I could see from my site exactly which template files where called in different cases.. (Front page, archives, single post view etc..)

    WordPress is really a smart thing! If it has no one file, it replaces it with another. For example normally to load a view of a single page, it used following files:
    functions.php,
    page.php,
    header.php,
    content-page.php,
    sidebar.php
    and footer.php.

    But if I remove page.php, it uses more general index.php to replace it. And if I remove content-page.php, it uses more general content.php on it’s place. So I CAN remove them, no harm!

    Only thing removing these files make is that without them I cannot specify for example that content of the page is shown in different way than the content of a post. Now all content is shown in the same way. But that’s ok for me! I can always add them again if needed or add CSS that makes difference between a page and a post.

    Thank you alchymyth for a good option. I’m sure I could have found it out that way too. This way was just faster.

    And thank me for a nice solution. Topic resolved. ??

    Thread Starter janneval

    (@janneval)

    Ok, I see. Also I cannot find reference to Underscores from Automattics webpage.. But well.. what ever it is, Underscores is great and I’m definitely going to use it to build my theme! ??

    Thread Starter janneval

    (@janneval)

    Ok, I understand. But I still wonder why I cannot find a single reference to _s on www.ads-software.com to say that it is their project.. Is there some reason for that?

    Thread Starter janneval

    (@janneval)

    Oops.. it was another plugin that somehow get messed up when i changed the other one. If you have similar problem and nothing I tried helps, try to disable all other plugins one by one and see if it helps.

    Good luck!

    Thread Starter janneval

    (@janneval)

    Actually, once I have made changes in AG Custom Admin I can turn on WP Click Info again and all the changes in AGCA remain. Nice. ?? So no necessary to hack anything, just bit tricky.

    Now another question since writing here.. It’s possible to create new menu items via AGCA. But is it possible to create parent menu item which has other items inside of it..? I would like to hide several things from the root of the admin menu and then create to the root just ONE new menu item under which I put as child menu items all those things which I have hidden. In the same way like we have one parent menu item “Settings” under which there is several child menu items like “General”, “Reading”, “Writing”… etc.

    Thanks for a tip!

    Thread Starter janneval

    (@janneval)

    When switching off Plugin “WP Click Info”, it starts working! Thanks for advice. ??

    However, would be nice to have WP Click Info also running since my client likes some thing it does makes.. Any tip how should I hack in the code of WP Click Info to make the thing work with both the plugins?

    Thread Starter janneval

    (@janneval)

    This is all where I can find jquery from my source code @ https://www.kollega.fi.

    … /wp-content/plugins/form-maker/css/jquery-ui-spinner.css?ver=3.8 …
    … /wp-includes/js/jquery/jquery.js?ver=1.10.2 …
    … /wp-includes/js/jquery/jquery-migrate.min.js?ver=1.2.1 …
    … /wp-content/plugins/form-maker/js/jquery-ui.js?ver=3.8 …
    … /wp-content/plugins/form-maker/js/jquery.ui.slider.js?ver=3.8 …

    Does it tell anything useful? Next I try to disable other plugins and see what happens..

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