We understand building sites can become really demanding sometimes and if you’re a control freak like we are, you probably want to have access to all code of your website – all the time. We finally accomplished that and are proud to give you full access to the most powerful widget of them all – WordPress Loop. This widget is part of the new framework and pulls the content of you current position on a website. For instance, when you are on About page, content from about page is displayed, if you’re on Contact page, content from contact page is pulled … and so on …
Edit your WordPress Loop widget content programatically:
- Open custom/custom_functions.php
- Define your custom PHP class:
$my_custom_loop = new my_loops;
- Edit content for desired position (home in our case):
class my_loops extends bizz_custom_loop { function home() { // edit home() content echo "Hello world!"; } }
List of available positions:
front— Front page of your site. Note: front page display must be set to a static page inside WordPress for this to have effect.page— Every page of your site except the front page if one is enabled.home— Your home page or, if a front page is enabled, your blog’s home page.single— All posts (often confusingly referred to as “single-entry pages”).attachment— Individual pages for post attachments (usually images).category— Category archive pages.tax— Taxonomy archive pages.tag— Tag archive pages.day— Daily archive pages.month— Monthly archive pages.year— Yearly archive pages.author— Author archive pages.archive— Generic archive pages; this loop is the default for category, tax, tag, day, month, year, author, and search pages.search— Search results pages. Note: This loop should also account for searches that do not return any results.fourohfour— 404 pages.nothing— This loop will run if there is nothing in the database to display.
Note: This feature would not be possible without Thesis theme and their GPL license, so thumbs up for their big contribution to the WordPress community.
Works with 7.0+ theme framework