Is there a way to schedule changes to a page?

you can do this with a shortcode like this add_shortcode(“custom_text_se282078”, function ($attr, $content, $tag) { $result = “”; if (date_i18n(“H”) > $attr[“time”]) { $result = $attr[“text_after”]; } else { $result = $attr[“text_before”]; } return $result; }); with that you just have to put that in the page : [custom_text_se282078 time=”10″ text_before=”text before 10 h” text_after=”texte … Read more

Prevent non-admin to add/create new pages

You can remove the capability using remove_cap, here you can see a list per role of all capabilities available, the one you want would be edit_pages, so this will work for the editor rol, which has that capability: $role = get_role( ‘editor’ ); $role->remove_cap( ‘edit_pages’ ); you may want publish_pages, edit_posts,publish_posts too, check the table … Read more

pre-existing data, and entities

Well the question is do you want to leverage WordPress or do you want to use your custom data. You can build fairly complex things in WordPress even with a plugin like Advanced Custom Fields, make a bunch of custom post types that all have different custom fields(some of which can be other post objects, … Read more

Use content from one page in another template

Assuming you have the following pages: Home About us that has a slug of about-us And you want to display the content of the About us page into the Home page. <?php $about_us = get_page_by_path(‘about-us’); // supply the page slug; i.e. about-us $about_us_content = get_the_content($about_us->ID); ?> <div><?php echo $about_us_content ; ?></div> Alternatively, you can use … Read more

Changes in WordPress taking 48hrs to reflect [closed]

You have to check if your WordPress site is using a cache plugin (such as WP Super Cache) or a CDN like CloudFlare or Amazon CloudFront. In that case, you can manually clean the cache in order to see those changes. You can also force refresh without cache, that will make you be able to … Read more

Function to incorporate an option in each Page

It sounds like you need custom meta boxes. You could either create your own plugin to add them or use a plugin like Advanced Custom Fields. You would add two meta boxes to each post type where you want to be able to select these options, one to select the image, and another to set … Read more

How to store archived copies of a WordPress site

One option: revisions. If you save a large number of revisions for your pages, you can then browse through the revision history and “Preview” what a particular page looked like at a particular point in time. However, this requires whoever is viewing the past view to be logged in, since Previews are not public. Another … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)