• Resolved samtazbu

    (@samtazbu)


    Hello Ben !

    A couple years back you helped me on multiple support tickets for various customisations of my website. Thanks again πŸ™‚

    I am back checking and using this website – and I noticed some time back that there were a couple clashes.

    1. At the end of my texts, I used the shortcode [placenotes] to place end notes. They displayed well – right below the text, and clearly before other elements placed in the html, and thus also below the independent share icons from plugins etc. Now, that shortcode appears as such if you visit the page, and the actual end notes come to the bottom most of the articles… I checked my plugins, and the only one I have for footnotes is one called “Easy Footnotes”. I contacted the developer of that plugin, asking if they changed the name of that shortcode used to place the notes exactly where we want… and he tells me they never used such a code – and in fact the plugin can’t command where to place them ! (They come automatically at the bottom most of each post.) I wondered if that could be a clash with another footnotes plugin, since each footnote is encoded in a very simple shortcode [note], but indeed I don’t have any other such plugin… So I wondered if perhaps updates or developments in Tracks could have caused this clash somewhere… ? Does it ring any bell at all ?

    (Example : http://www.samvriti.com/2014/05/09/stories-from-a-history/)

    2. Back then I needed to centre a few pages and page elements, full screen. (For example : the homepage, http://www.samvriti.com.) I followed your suggestions to use a <div class="full-width">, and then in CSS the following :

    .full-width td {
      padding: 0;
    }
    
    .full-width table {
      margin: 0;
    }
    
    .entry-content .full-width {
        position: relative;
        max-width: none;
        width: 111%;
        left: -5.5%;
    }

    It used to centre just fine back then… and now there is an off-balance, with some margin on the right. Maybe due to a theme update ?

    Once again – thanks for your help !

    All the best,

    Samuel

    Note : I subscribed to Tracks Pro and the yearly plan must have come to an end some time back… Could the clashes be due to that ? Reverting to non-pro features ? (I’m not sure I used any… !)

    Note 2 : any known clash between Tracks and the Divi builder plugin ?

    • This topic was modified 8 years ago by samtazbu.
    • This topic was modified 8 years ago by samtazbu.
    • This topic was modified 8 years ago by samtazbu.

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Theme Author Ben Sibley

    (@bensibley)

    Hey Samuel,

    Thanks for sticking with Tracks through the years πŸ™‚

    I’m not aware of any bug in Tracks that prevents shortcodes from working (an expired PRO license won’t affect this either). Do you still have access to the footnotes content somewhere in your dashboard?

    As for the content on the homepage, this CSS should adjust it to stay centered:

    .full-width table {
      margin: 0 auto;
    }

    I haven’t tested Tracks with Divi, so I can’t say for sure if there’s a conflict or not.

    Thread Starter samtazbu

    (@samtazbu)

    Hey Ben !

    Thanks for being around, always πŸ™‚

    The full-width css solved it ! Thanks !

    Do you still have access to the footnotes content somewhere in your dashboard?

    I’m not sure what you mean exactly here ?
    Here is what I can tell you – for example for this page : http://www.samvriti.com/2014/05/09/stories-from-a-history/

    Here is the part of the post HTML where a footnote is included :

    ... And naturally, Julia Kristeva’s <em>Strangers to Ourselves</em> [note]Julia Kristeva, <em>Strangers to Ourselves</em> (New York: Columbia University Press, 2006). It was published in French in 1988.[/note] would have to start the work from scratch...

    Here is where the indicated footnotes content should appear (in the place of [placenotes]) :

    <div style=”margin-left: 200px; margin-right: 200px;”>

    ... [spacer height="50px"]
    
    [placenotes]
    
    [spacer height="50px"]
    [su_accordion]
    [su_spoiler title="References" style="fancy"]
    
    Arendt, Hannah. <i>The Origins of Totalitarianism</i>. New York: Harcourt, Brace, Jovanovich, 1979. ...

    But right now it appears beyond the scope of the HTML – under the frame of text for that post, basically. And apparently that’s where this plugin is supposed to place the footnotes.

    What is very strange is, that worked just fine back then a couple years back… and I’m not skilled enough to have created a shortcode on my own… ! The [note] and [placenotes] shortcodes worked just fine together – at most the current plugin I use makes use of the [note] shortcode, which another plugin used alongside the [placenotes] shortcode… and so I would have been using that other plugin then, and then I switched to this plugin – without any memory of this -, and only the first shortcode is used ? Seems improbable…

    A google search of “footnotes WordPress plugin “[placenotes]”” leads to nothing… ! How can that be ? There must have been other users of that feature, and some log somewhere of that feature at a point in time, even if it was removed later… The plugin author of Easy Footnotes sounds categorical about not knowing what that shortcode is : https://ww.wp.xz.cn/support/topic/custom-display-of-footnotes-on-post-bottom/

    Any idea what this could be ? How would you go about this ?

    (The problem being that that shortcode is placed on some 100+ posts… so an automatic/systemic resolution would save much time…)

    Thanks !

    Samuel

    Theme Author Ben Sibley

    (@bensibley)

    I see now. I wasn’t sure where the placenote content was coming from.

    I have to say I’m kind of lost on this one. Plugins can “register” shortcodes which converts them into dynamic content, so if the plain shortcode is displaying it means this shortcode is no longer being registered. I think it’s most likely a plugin has been deactivated that you used in the past. I think it’s unlikely that a plugin author would remove support for a previous shortcode because they know that it will break existing uses of the shortcode.

    Do you have any old back-ups of your site? A full back-up would contain the plugins formerly used and may help you find the right one.

    Thread Starter samtazbu

    (@samtazbu)

    Hey Ben,

    Thanks for looking into my situation !

    I doubt I have any backup of the site… And I have the general memory that this plugin worked pretty much directly and from the start… no memory of some other appearance of the footnotes, etc. So the mystery most probably shall remain as to the chronological origin of this situation… !

    In the support page shared above, the developer says “Was that shortcode something you had custom built to work with Easy Footnotes?” – How difficult would that be to create and set up this custom built short code ? Now that I have the shortcode placed on each of my 100+ articles… a little effort in getting the right, centralised coding done may be worth. How would you approach such a task ? What is the level of difficulty ?

    Thanks !

    Theme Author Ben Sibley

    (@bensibley)

    It will require writing a new PHP function which you can add in a child theme or as a plugin. WordPress provides an overview of how to register custom shortcodes here: https://codex.ww.wp.xz.cn/Shortcode_API

    First, you would register “placenotes” as a shortcode. Then you create the output function and you can give it some placeholder output (any text at all) to test it and you’ll know if it’s working because that new text will show up everywhere on your site where the [placenotes] shortcode appears. The next part is a bit trickier.

    In the output function, you’ll get the current $post object and search through the content to find all instances of “[note]” and output all the text before “[/note]”. With the addition of some HTML, this is how the placenotes shortcode could output a list of all the notes marked in the copy of the post.

    • This reply was modified 8 years ago by Ben Sibley.
    Thread Starter samtazbu

    (@samtazbu)

    Hi Ben !

    Thanks for the detailed explanation !

    and search through the content to find all instances of β€œ[note]” and output all the text before β€œ[/note]”. With the addition of some HTML, this is how the placenotes shortcode could output a list of all the notes marked in the copy of the post.

    By that, do you mean, integrating in the php function literally all the texts from my entire website that should appear in the footnotes section ?

    In other words, would you mean something like creating basically a shortcode per post : if I have say 10 posts, then I create a short code [placenotes1] for post 1, [placenotes2] for post 2, etc, and go include in the php file itself those note references… ?

    That sounds very tedious, of course. Or did you mean what I had in mind – to find a way to combine the function of the existing Easy Footnotes plugin with that new custom shortcode…?

    (sorry for my amateurism ! πŸ˜› )

    Thanks again,

    Samuel

    Theme Author Ben Sibley

    (@bensibley)

    The output function will be added to a plugin or the theme just once and work right away for every instance of [placenotes] on your site. This function will run every time WordPress is displaying a post and encounters that specific shortcode.

    In the output function for the shortcode, you can get the $post PHP object that contains all of the posts properties including the post content. You can use a method just like this to create an array of all the [notes] that appear in the post content. Then you would loop through the array and output a list of the notes.

    It’s completely dynamic this way and won’t require any updates to the post themselves.

    Thread Starter samtazbu

    (@samtazbu)

    Hey Ben,

    Thanks for sharing the link, and the explanations. That seems fairly advanced for my current level of skills… I may return to it a little later if I’m able to understand those steps better. Once again : thanks a lot for your help !!!

    Best,

    Samuel

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

The topic ‘Possible clash with shortcode [placenotes]’ is closed to new replies.