• I’d like a create a new Top-level Admin menu item called ‘Website Text’ where a user can edit specific areas of text displayed on pages of their website.

    I’d need to be able to reference and display this content on pages or templates.

    So for example the user could edit their Biography text via the ‘Website Text’ menu item, and their biography text on their About Me page would be updated.

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter fxfuture

    (@fxfuture)

    I’ve installed the More Fields plugin and I’m able to create a menu item with a list of editable text on the website – see screenshot here

    More Fields is storing these as posts in the MySQL database.

    So surely I could just query the database and call the main content of each post into the relevant page?

    Thread Starter fxfuture

    (@fxfuture)

    Ok, so I’ve worked out how to query and return the contents of the More Types posts with PHP. And this actually works very nicely. For those interested, locate the ID from the WP MySQL database and call it with the following PHP:

    $mytext = $wpdb->get_results("SELECT post_content FROM $wpdb->posts WHERE ID = 1");
    
    echo $mytext->post_content;

    But… their must be a simple plugin as I described above that can be called in a page with something like:

    [text-content id=1]
    [text-content id=2]

    etc…

    You might want to take a look at one of my Plugins called Contemplate. You can use it to define blocks of text/html/javascript etc. in the Plugin options page, then add these to theme template files, posts, and pages wherever you need them. You can get the Plugin here:

    https://www.ads-software.com/extend/plugins/contemplate/

    Thread Starter fxfuture

    (@fxfuture)

    This looks like a great plugin!

    But unfortunately as it’s limited to 5 templates and requires Silverlight it’s not suitable for this particular use.

    Might have to design my own plugin. I only know basic php but I’m pretty good at picking things up and piecing stuff together.

    How hard is it? Any good tutorials or resources you can recommend?

    Future versions will support more templates, and the Silverlight Plugin options engine make it sooo easy to use.

    If you can’t stand the Silverlight aspect then you can download the Plugin and look at the code, and remove the Silverlight.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Menu item to edit text on pages – what plugin can do this?’ is closed to new replies.