Forum Replies Created

Viewing 15 replies - 16 through 30 (of 36 total)
  • Thread Starter benutzerfreund

    (@benutzerfreund)

    Thanks for the clarification.

    I narrowed the problem with get_template_part() down to this: I have a function in the ads.php which I include. When I try it without and put the function in functions.php of the theme, everything works fine.

    Apparently functions in included templates can only be included once?

    Thread Starter benutzerfreund

    (@benutzerfreund)

    Thanks for the tip, that works.

    But I thought using templates is the more elegant way—do I understand it correctly that there is no way calling these more than once?

    Thread Starter benutzerfreund

    (@benutzerfreund)

    If you read carefully, you see that the problem is when the PlugIn “Limit Login Attempts” is installed, too.

    I now use “Simple Login Lockdown”, which plays along nicely with I-Agree.

    Thread Starter benutzerfreund

    (@benutzerfreund)

    Oh my, I should think before replying. You pointed me in the right direction – on the Relevanssi-page everything is spelled out.

    You just have to insert the line
    relevanssi_do_query($the_query);
    in the code above (before the ‘while’).

    Thanks a lot!

    Thread Starter benutzerfreund

    (@benutzerfreund)

    Ah, thanks a lot for the tip!

    In fact I use the plugIn Relevanssi on my site. When I deactivate it, the function works as it should.

    Any idea how I can use Relevanssi and my own code alongside? The standard search of WP is … not so good.

    Thread Starter benutzerfreund

    (@benutzerfreund)

    @ron22: As you might have noticed, everything on my site is fine now. The trick was to add this code to footer.php:

    /**
    * Enables menu toggle for small screens.
    */
    ( function() {
    var nav = $( '#site-navigation' ), button, menu;
    if ( ! nav )
    return;
    button = nav.find( '.menu-toggle' );
    if ( ! button )
    return;
    // Hide button if menu is missing or empty.
    menu = nav.find( '.nav-menu' );
    if ( ! menu || ! menu.children().length ) {
    button.hide();
    return;
    }
    $( '.menu-toggle' ).on( 'click.twentythirteen', function() {
    nav.toggleClass( 'toggled-on' );
    } );
    } )();

    I suppose, it is a dirty hack – so if you come up with a better solution, please post this here…

    Thread Starter benutzerfreund

    (@benutzerfreund)

    Ok, I have no idea why, but the JavaScript which is necessary for this was missing. Adding it to footer.php of my child theme as a developer proposed, did fix this.

    Does anyone have any idea why this happens and where I should place this function correctly – my solutions seems like a bad hack.

    Thread Starter benutzerfreund

    (@benutzerfreund)

    Thanks for your detailed answer, Mike.

    I will think about how to tackle this problem, and your explanations helped a lot!

    Thread Starter benutzerfreund

    (@benutzerfreund)

    Thanks for your help, I really appreciate this!

    I did not find out why this is happening, but I found a workaround: The PlugIn Yoast WordPress SEO, which I am using anyway, has a setting in the section Permalinks where I can remove the “category” from the category URLs.

    This is a solution that works for me.

    Thread Starter benutzerfreund

    (@benutzerfreund)

    Thanks for the great answer, Mike. I will consider this.

    But what I wanted to achieve is to keep WP as lightweight and clean as possible, so I did not add another role.
    I just did change a name intended for display, not coding use. These names are translated by WP anyway, so using the names that WP gives would be a better approach in my opinion.

    If you would use these nice names instead of the internal role names (what WP itself does), you wouldn’t have to mind the translation of these as a bonus, because they would be correct for anybody using another language version than English.

    Thread Starter benutzerfreund

    (@benutzerfreund)

    I use in functions.php

    $wp_roles->roles['editor']['name'] = 'Customer Account';
        $wp_roles->role_names['editor'] = 'Customer Account';

    to rename the roles in the backend.

    In WPs Profile Settings, for example, I see my custom name in the popup menu.

    But in Email users I still see Role - Editor.

    Thread Starter benutzerfreund

    (@benutzerfreund)

    I use 3.6.1. The wording might be different because I use the German language setting.

    Thread Starter benutzerfreund

    (@benutzerfreund)

    This is odd. I tried
    /%postname%

    Which works as expected – only one archive page, and all posts directly in the root.

    But when I go back to
    /%category%/%postname%

    everything is like before… strange. Any more idea?

    Thread Starter benutzerfreund

    (@benutzerfreund)

    Thanks for looking into this. Your tips helped me to get closer to the issue:

    Its neither the plugins nor the theme. When I set the theme to twentythirteen and deactivate all plugins, I get the same result. (The canonical links disappear, though.)

    So I suppose it has something to do with this: In Settings>Permalinks I checked “User-defined structure” and entered
    /%category%/%postname%/

    What I want is that my posts appear in “folders” for the category to which they belong, like (for the example of the category “allgemein”):
    https://www.benutzerfreun.de/allgemein/geld-verdienen-mit-videos-auf-vimeo/

    This works as it should, but apparently this creates the category archive page as well. Or am I mistaken?

    Thread Starter benutzerfreund

    (@benutzerfreund)

    Thanks a lot for your quick reply. Do you know by chance of any other plugIn to achieve this – I could not find any.

Viewing 15 replies - 16 through 30 (of 36 total)