Forum Replies Created

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter Nickybbb

    (@nickybbb)

    I know have made this script but it isn’t working:

    <?php
    if (is_front_page()) {
     	query_posts('cat=Home');
    }
    elseif (is_home()) {
       query_posts('cat=Home');
    }
    elseif (is_page('Home')) {
       query_posts('cat=Home');
    }
    elseif (is_page('De verhuizing')) {
       query_posts('cat=Verhuizing');
    }
    elseif (is_page('Ons werk')) {
       query_posts('cat=Ons werk');
    }
    elseif (is_page('Contact')) {
       query_posts('cat=Contact');
    }
    else {
       query_posts('cat=Geen categorie');
    }
    ?>

    Anyone that can help me?

    maybe you can use something from the script i made:

    php:

    <?php
    if (is_front_page()) {
       $header = 'header_home';
    }
    elseif (in_category('Beeldbewerking')) {
       $header = 'header_beeldbewerking';
    }
    elseif (in_category('Communicatie')) {
       $header = 'header_communicatie';
    }
    elseif (in_category('Communicatie')) {
       $header = 'header_communicatie';
    }
    elseif (in_category('Design')) {
       $header = 'header_design';
    }
    elseif (in_category('Drukwerk')) {
       $header = 'header_drukwerk';
    }
    elseif (in_category('DTP smartness')) {
       $header = 'header_dtp';
    }
    elseif (in_category('Fotografie')) {
       $header = 'header_fotografie';
    }
    elseif (in_category('Guerrilla')) {
       $header = 'header_guerrilla';
    }
    elseif (in_category('Krokant!')) {
       $header = 'header_krokant';
    }
    elseif (in_category('Marketing')) {
       $header = 'header_marketing';
    }
    elseif (is_category ('Ons werk')) {
       $header = 'header_onswerk';
    }
    elseif (is_single() && in_category ('Ons werk')) {
       $header = 'header_onswerk';
    }
    elseif (in_category('Regio')) {
       $header = 'header_regio';
    }
    elseif (in_category('Social media')) {
       $header = 'header_socialmedia';
    }
    elseif (in_category('Strikje erom')) {
       $header = 'header_strikjeerom';
    }
    elseif (in_category('Typografie')) {
       $header = 'header_typografie';
    }
    elseif (in_category('Webdesign')) {
       $header = 'header_webdesign';
    }
    elseif (is_home()) {
       $header = 'header_home';
    }
    elseif (is_page('Home')) {
       $header = 'header_home';
    }
    elseif (is_page('Actie')) {
       $header = 'header_actie';
    }
    elseif (is_page('Ons werk')) {
       $header = 'header_home';
    }
    elseif (is_page('Contact')) {
       $header = 'header_home';
    }
    elseif (is_page('Nieuwsbrief')) {
       $header = 'header_home';
    }
    elseif (is_page('FTP')) {
       $header = 'header_home';
    }
    elseif (is_page('Vacatures')) {
       $header = 'header_home';
    }
    elseif (is_page('Colofon')) {
       $header = 'header_home';
    }
    elseif (is_page('Links')) {
       $header = 'header_home';
    }
    else {
       $header = 'header_home';
    }
    
    ?>
    
    <?php echo ' class="', $header, '"'; ?>>

    css:

    .header_socialmedia {
    	height: 230px;
    	width: 960px;
    	background-image: url(images/header_socialmedia.jpg);
    	background-repeat: no-repeat;
    }

    it’s also possible to jsut use a png:

    <link rel=”icon” type=”image/png” href=”https://www.website.com/fav.png&#8221; />

    Forum: Plugins
    In reply to: [Users] Rights adjustments
    Thread Starter Nickybbb

    (@nickybbb)

    I’ve checked that before, but i can’t find a good plugin or script code to change the Author rights.

    Thread Starter Nickybbb

    (@nickybbb)

    * bump *

    Thread Starter Nickybbb

    (@nickybbb)

    thx for the help, it works ??

    Nickybbb

    (@nickybbb)

    U can try to use the is_page code.

    https://codex.www.ads-software.com/Function_Reference/is_page

    I used it to get different header with css, but i’m sure u can make it to get different menu’s with div’s.

    <?php
    
    if (in_category('Beeldbewerking')) {
       $header = 'header_beeldbewerking';
    }
    elseif (in_category('Communicatie')) {
       $header = 'header_communicatie';
    }
    elseif (in_category('Communicatie')) {
       $header = 'header_communicatie';
    }
    elseif (in_category('Design')) {
       $header = 'header_design';
    }
    elseif (in_category('Drukwerk')) {
       $header = 'header_drukwerk';
    }
    elseif (in_category('DTP smartness')) {
       $header = 'header_dtp';
    }
    elseif (in_category('Fotografie')) {
       $header = 'header_fotografie';
    }
    elseif (in_category('Guerrilla')) {
       $header = 'header_guerrilla';
    }
    elseif (in_category('Krokant!')) {
       $header = 'header_krokant';
    }
    elseif (in_category('Marketing')) {
       $header = 'header_marketing';
    }
    elseif (in_category('Ons werk')) {
       $header = 'header_onswerk';
    }
    elseif (in_category('Regio')) {
       $header = 'header_regio';
    }
    elseif (in_category('Social media')) {
       $header = 'header_socialmedia';
    }
    elseif (in_category('Strikje erom')) {
       $header = 'header_strikjeerom';
    }
    elseif (in_category('Typografie')) {
       $header = 'header_typografie';
    }
    elseif (in_category('Webdesign')) {
       $header = 'header_webdesign';
    }
    elseif (is_front_page('Home')) {
       $header = 'header_home';
    }
    elseif (is_page('Home')) {
       $header = 'header_home';
    }
    elseif (is_page('Ons werk')) {
       $header = 'header_home';
    }
    elseif (is_page('Contact')) {
       $header = 'header_home';
    }
    elseif (is_page('Nieuwsbrief')) {
       $header = 'header_home';
    }
    elseif (is_page('FTP')) {
       $header = 'header_home';
    }
    elseif (is_page('Vacatures')) {
       $header = 'header_home';
    }
    elseif (is_page('Colofon')) {
       $header = 'header_home';
    }
    elseif (is_page('Links')) {
       $header = 'header_home';
    }
    else {
       $header = 'header_home';
    }
    
    ?>
    
    <?php echo ' class="', $header, '"'; ?>>
    Thread Starter Nickybbb

    (@nickybbb)

    i used the in_cat now, but that code overwrites my is_front_page code since there is a post underneath my index page.

    https://www.studio-strijp.nl/wordpress

    If u click on the button “home” u get the correct image. Is there a fix for the index page?

    Nickybbb

    (@nickybbb)

    You have to edit the html/css of it.

    You can center a div that is around the menu.

    <div id="menu1">
    menu here
    </div>

    in css:

    #menu1 {
    margin: 0px auto 0px auto;
    }

    With using auto for the left and right margin u center the div.

    The get the menu down, u can play with the margin of the top to or if its used the position.

    Thread Starter Nickybbb

    (@nickybbb)

    damm, i’ve spend hours looking for an option…to easy this!

    Thx

    Nickybbb

    (@nickybbb)

    It is really easy.

    1. You create 2 menu’s in wordpress
    2. Click the tab of the menu u want to put pages/cats in
    3. Mark the page/cat u want to have in that menu and click on add to menu

    that’s all

    Thread Starter Nickybbb

    (@nickybbb)

    ok, sorry was very busy at the time ?? Now i have this for my header images: https://pastebin.com/embed_js.php?i=StFjCqR7

    It changes the header for every different page and category. However, when i read a certain post in a category the header switches bac kto default (from my page).

    Is there an option to let wordpress know in which category im reading?

    Forum: Fixing WordPress
    In reply to: Image alignment
    Nickybbb

    (@nickybbb)

    try this in your css:

    img.centered {
        display: block;
        margin-left: auto;
        margin-right: auto;
    	border: 0px;
    }
    
    img.alignright {
        padding: 4px;
        margin: 0 0 2px 7px;
        display: inline;
    	border: 0px;
    }
    
    img.alignleft {
        padding: 4px;
        margin: 0 7px 2px 0;
        display: inline;
    	border: 0px;
    }
    
    .alignright {
        float: right;
    }
    
    .alignleft {
        float: left;
    }
Viewing 13 replies - 1 through 13 (of 13 total)