WortGepresst – WordPress und Co werden von mir hier eingetütet.



STARTSEITE MULTIMEDIA WORTGEPRESST FAMILIENBANDE BOOKMARK PRIVACY


Creating page templates for specific post types

By default, a custom page template will be available to the “page” post type. To create a page template to specific post types, add a line under the template name with…

Automatic Pop-ups with jQuery bPopup Plugin

Quelle: //www.ostraining.com/blog/coding/jquery-bpopup/ One of our users asked for a way to open a modal pop-up automatically when a page loads. In this tutorial, I'm going to show you how to…

Next and previous page links

[crayon-5b8f81854ee8b389490880/] The previous_post_link() and next_post_link() template tags take four optional parameters: format – This is the text displayed before or after the link. The default value is ‘« %link’. link – This is the…

Pagination in WordPress

functions.php - Template für Pagination definieren Öffnet die functions.php des Themes und fügt folgenden Code ein. Mit diesem Snippet wird das Template der Pagination definiert – ein <nav>-Element mit ungeordneter…

Base for index

  [crayon-5b8f81857b97b413230454/]

style.css

  [crayon-5b8f81857e176886422755/]

CSS: A micro clearfix hack

[crayon-5b8f81858a9dd714535009/]  

Else if Statement WordPress.

else_if.php [crayon-5b8f8185920a1752856614/]  

WordPress-Papierkorb

WordPress-Papierkorb automatisch leeren Wenn ihr das 30-Tage-Zeitintervall für die automatische Leerung des Papierkorbs verlängern oder verkürzen wollt, fügt folgendes Snippet in die wp-config.php ein und passt die Zahl am Ende entsprechen an. [crayon-5b8f818595b66832456180/]…

Vorschau-Button ausblenden

[crayon-5b8f818599db1504442252/]  

WP-Loop um Custom Post Types erweitern

[crayon-5b8f81859dbdf753350162/] WordPress-Standard-Loop nur für spezielle Seiten Im unten stehenden Code-Beispiel wird der Loop inklusive der hinzugefügten Custom Post Types nur auf der Startseite (Front Page) ausgegeben. [crayon-5b8f81859dc44038689746/] WordPress spezielle Seiten im Widget…

Customize the WordPress Login Page

Add a custom background Replace the WordPress logo with a custom logo Customize the look of the login form Change the login logo URL Remove the lost password link Remove…

Create A URL Slug With PHP

Having a user friendly URL is user important not just for SEO but also to help the visitors know that the website they are on is correct. If you have…

PHP-Aufruf mit action

Get-Parameter über PHP-Code: [crayon-5b8f8185b2025815015095/]   und Post_paramter über PHP-Code: [crayon-5b8f8185b2088753977266/]   by //php.net/manual/en/reserved.variables.post.php

webkit-scrollbar

[crayon-5b8f8185b62c8267762509/]  

Simple responive font-size css

[crayon-5b8f8185ba744899372757/]   zB: for responsive articles: [crayon-5b8f8185ba7b6442080795/]  

short URLs in WordPress

Just include the following code anywhere in the WordPress loop to display a short URL for the post: <?php echo get_bloginfo('url')."/?p=".$post->ID; ?> For each post or page, this will display…

screenshots of any web page

Just edit the following URL, replacing google.com with the URL for which you would like a screenshot and enter it in your browser: [crayon-5b8f8185c0921694441414/] or: [crayon-5b8f8185c097e427323292/] w=1000&h=300 / width=1000px&height=300px You can also…

jQuery Reload Current Page on Click

Let’s say you have an HTML link such as: [crayon-5b8f8185c4a9f875778350/]   Adding the following jQuery script will reload the current page when clicked: JavaScript [crayon-5b8f8185c4b01922387186/]   Keep in mind that…

PHP Get Actual IP Address

Method 1 This is the method that I use in my projects to get the actual IP address: PHP [crayon-5b8f8185c95e4056364219/]   This is a plug-n-play snippet with no modification necessary.…

Use WP functions outside of WordPress

Here’s how easy it use to use any of WordPress default functionality from any PHP file outside of the WordPress installation directory. One step Add this to the beginning of…

Create a WordPress shortcode

Add this to your theme’s functions.php file: PHP [crayon-5b8f8185d2676150242270/]   Then to show some love anywhere in your posts or pages, just type the following shortcode: [luv] Much more is possible, visit…

Query custom post types

  Let’s say our custom post type is named “books”. Here is how to create a list of posts from the books custom post type: PHP [crayon-5b8f8185d60f6784672872/]   This code…

Lazy Load

First this: JavaScript [crayon-5b8f8185da189231694027/]   Then this: JavaScript [crayon-5b8f8185da1e9423735064/]   And finally ended up rolling with this: JavaScript [crayon-5b8f8185da245183957879/]   Bonus: Check if Lazy Load is working As a bonus,…

Create WordPress widgets

[crayon-5b8f8185df47c593883796/]  

Display external files with a shortcode

Open your theme’s functions.php file and add the following code: PHP [crayon-5b8f8185e2cd5641696894/]   With that in place you can use this shortcode to display the specified file anywhere in your posts or…

Include files from parent directory, subdirectory

Get parent directory from within sub-directory For WordPress plugins, here is how to get and/or include a file that is located in the parent directory: PHP [crayon-5b8f8185e7353726770478/]   Note that…

Private notes and members-only content

Private Notes When working on posts and pages, drop yourself a private note that only you (and other admins) can see. All you need is the following code in your…

Advanced search for custom post types

Setting up custom search forms for custom post types can be tricky business. Here’s a quick & easy guide to make it happen in two steps. Step 1: Edit the…

HTML frames template

[crayon-5b8f818604ebb132562983/]  

Post format archives

... let’s say that you’re displaying links to the archive-views of your various custom-formatted posts (i.e., Post Formats). When visitors follow those links, the Post Format archives will be displayed…

Combine all CSS files with PHP

Delivering one CSS file with your web pages is much faster than delivering multiple files because there are fewer HTTP requests involved. Edit this snippet as indicated with the path…

Simple PHP login form

Here is the magic PHP snippet to create a basic login form: [crayon-5b8f81860e468991740076/]  

Search in custom post types

functions.php: [crayon-5b8f8186111ab714650938/]  

WP-Adminbar Tricks

Admin Bar Tricks for WordPress 3.1 and better: Disable the Admin Bar for individual users Disable the Admin Bar for all users of the current theme Disable the Admin Bar for…

Font Resize
Contrast
Zur Werkzeugleiste springen